Add polymorphic tuple projections and replacements
This commit is contained in:
3 files changed
+10
No files matched your search
@@ -20,3 +20,8 @@ let () =
|
||||
let focus = compose first second in
|
||||
assert (view focus ((true, "grey"), false) = "grey");
|
||||
assert (set focus 9 ((true, "grey"), false) = ((true, 9), false))
|
||||
|
||||
let () =
|
||||
assert (set _1 "grey" (1, true) = ("grey", true));
|
||||
assert (over _2 ~f:string_of_int (false, 9) = (false, "9"));
|
||||
assert (view (compose _1 _2) ((true, "grey"), ()) = "grey")
|
||||
Reference in new issue
Block a user