Skip to content

Instantly share code, notes, and snippets.

@SteveGilham
Created April 26, 2015 13:52
Show Gist options
  • Save SteveGilham/42af15b33fe331a80aa8 to your computer and use it in GitHub Desktop.
Save SteveGilham/42af15b33fe331a80aa8 to your computer and use it in GitHub Desktop.
type Point = { x: int; y: int; move: Point -> Point }
let rec makePoint vx vy =
let doMove p = makePoint (vx + p.x) (vy + p.y)
{ x = vx; y = vy; move = doMove };;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment