Define polymorphic lenses and compile the runtime library
This commit is contained in:
9 files changed
+61
No files matched your search
@@ -0,0 +1,6 @@
|
||||
open Fieldglass
|
||||
|
||||
let sample : (string * bool, string) lens' =
|
||||
lens ~view:fst ~set:(fun value (_, other) -> value, other)
|
||||
|
||||
let () = assert (view sample ("colour", true) = "colour")
|
||||
Reference in new issue
Block a user