-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
In the Composition section of the Lenses guide, there's this example:
(* Lens<'a,'b> -> 'a -> 'b *)
let get (g,_) =
fun a -> g a
(* Lens<'a,'b> -> 'b -> 'a -> 'a *)
let set (_,s) =
fun b a -> s b aCould (and should?) this be simplified to:
(* Lens<'a,'b> -> 'a -> 'b *)
let get (g,_) = g
(* Lens<'a,'b> -> 'b -> 'a -> 'a *)
let set (_,s) = sThe latter code snippet is functionally the same as the former. Is there any reason why the first code snippet is used instead of the second? Perhaps I'm missing the point it's trying to make.
Metadata
Metadata
Assignees
Labels
No labels