Skip to content

Instantly share code, notes, and snippets.

@i2y
Last active August 29, 2015 14:20
Show Gist options
  • Save i2y/e265db2de4962e63fa86 to your computer and use it in GitHub Desktop.
Save i2y/e265db2de4962e63fa86 to your computer and use it in GitHub Desktop.
Mochi - example
data List:
Value(n)
Cons(v:Value, list:List)
match Cons(Value(1), Cons(Value(1), Value(2))):
Cons(Value(1), Cons(Value(1), Value(2))): print("match!")
_: print("no match!")
# -> "match"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment