Skip to content

Instantly share code, notes, and snippets.

@caseybasichis
Last active August 29, 2015 14:16
Show Gist options
  • Save caseybasichis/351d260c597af0211b41 to your computer and use it in GitHub Desktop.
Save caseybasichis/351d260c597af0211b41 to your computer and use it in GitHub Desktop.
Mapping outline
type c = {x : int; y: int ; z : int ;}
let c_empty ?(x=1) ?(y=1) ?(z=1) () = { x; y; z }
let my_func (foos:int) = [ [ c_empty () ] ]
myData
|> my_func
|> ....
type d = {t : int; u : int; v : int;}
type e = {w : d}
let d_empty ?(t=0) ?(u=0) ?(v=0) () = {t; u; v}
let e_empty ?(w=(d_empty ())) () = {w}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment