Skip to content

Instantly share code, notes, and snippets.

@techtangents
Created April 25, 2015 00:07
Show Gist options
  • Save techtangents/5118dbb811f96a9a0d4d to your computer and use it in GitHub Desktop.
Save techtangents/5118dbb811f96a9a0d4d to your computer and use it in GitHub Desktop.
record pattern matching example
type Pos2D = Pos2D { x : Int, y : Int }
area : Pos2D -> Int
area (Pos2D {x,y}) = x * y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment