Skip to content

Instantly share code, notes, and snippets.

@kolektiv
Created September 16, 2016 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kolektiv/8704b096befece9097063ff3e3b6e8a1 to your computer and use it in GitHub Desktop.
Save kolektiv/8704b096befece9097063ff3e3b6e8a1 to your computer and use it in GitHub Desktop.
morphisms, etc.
let record =
{ Ages = "24,56,45,10" }
(* 56 *)
let oldest =
Optic.get recordints_ record |> List.max
(* { Ages = "25,57,46,11" } *)
let record' =
Optic.map recordints_ (List.map ((+) 1)) record
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment