Expose infix viewing, replacement, mapping, and composition
This commit is contained in:
3 files changed
+24
No files matched your search
@@ -25,3 +25,11 @@ let _hd =
|
||||
let _tl =
|
||||
(fun source -> snd (split source)),
|
||||
(fun tail source -> fst (split source) :: tail)
|
||||
|
||||
module Infix = struct
|
||||
let ( ^. ) source focus = view focus source
|
||||
let ( ^~ ) = set
|
||||
let ( ^% ) focus f = over focus ~f
|
||||
let ( ^> ) = compose
|
||||
let ( ^< ) inner outer = compose outer inner
|
||||
end
|
||||
Reference in new issue
Block a user