@@ -31,30 +31,28 @@ module Lens =
3131 /// <summary >Write to a lens.</summary >
3232 /// <param name =" lens " >The lens.</param >
3333 /// <param name =" v " >The value we want to write in the part targeted by the lens.</param >
34- /// <param name =" source " >The original object.</param >
35- /// <returns >The new object with the value modified.</returns >
34+ /// <returns >A function taking the source paramenter and returning the new object with the value modified.</returns >
3635 let setl lens v = Identity.run << lens ( fun _ -> Identity v)
3736
3837 /// <summary >Update a value in a lens.</summary >
3938 /// <param name =" lens " >The lens.</param >
4039 /// <param name =" f " >A function that converts the value we want to write in the part targeted by the lens.</param >
41- /// <param name =" source " >The original object.</param >
42- /// <returns >The new object with the value modified.</returns >
40+ /// <returns >A function taking the original object and returning the new object with the value modified.</returns >
4341 let over lens f = Identity.run << lens ( Identity << f)
4442
4543 /// <summary >Read from a lens.</summary >
4644 /// <param name =" lens " >The lens.</param >
47- /// <param name =" source " >The object.</param >
48- /// <returns >The part the lens is targeting.</returns >
45+ /// <returns >A function taking the object and returning the part the lens is targeting.</returns >
4946 let view lens = Const.run << lens Const
5047
5148 /// <summary >Retrieve the first value targeted by a Prism, Fold or Traversal (or Some result from a Getter or Lens). See also (^?).</summary >
5249 /// <param name =" prism " >The prism.</param >
50+ #if FABLE_ COMPILER
5351 /// <param name =" source " >The object.</param >
5452 /// <returns >The value (if any) the prism is targeting.</returns >
55- #if FABLE_ COMPILER
5653 let preview ( optic : ( 'a -> Const < _ , 'b >) -> _ -> Const < _ , 't >) ( source : 's ) : 'a option = source |> optic ( fun x -> Const ( First ( Some x))) |> Const.run |> First.run
5754 #else
55+ /// <returns >A function taking the object and returning the value (if any) the prism is targeting.</returns >
5856 let preview prism = First.run << Const.run << prism ( fun x -> Const ( FSharpPlus.Data.First ( Some x)))
5957 #endif
6058
@@ -63,7 +61,6 @@ module Lens =
6361 /// <param name =" getter " >The getter function.</param >
6462 /// <param name =" setter " >The setter function, having as first parameter the object and second the value to set.</param >
6563 /// <param name =" f " >The free parameter.</param >
66- /// <param name =" s " ></param >
6764 /// <returns >The lens.</returns >
6865 let inline lens ( getter : 's -> 'a ) ( setter : 's -> 'b -> 't ) ( f : 'a -> '``F < 'b > ``) = fun s -> setter s </ Map.InvokeOnInstance/> f ( getter s) : '`` F<'t> ``
6966
0 commit comments