Skip to content

Instantly share code, notes, and snippets.

@SteveGilham
Created April 26, 2015 13:48
Show Gist options
  • Save SteveGilham/5c47e46c37289d6ca167 to your computer and use it in GitHub Desktop.
Save SteveGilham/5c47e46c37289d6ca167 to your computer and use it in GitHub Desktop.
type Point(x,y)
= class
let mutable vx = x
let mutable vy = y
interface IPoint
with member p.move q = vx <- vx + q.x;
vy <- vy + q.y
member p.x = vx
member p.y = vy
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment