Last active
August 29, 2015 14:20
-
-
Save i2y/e265db2de4962e63fa86 to your computer and use it in GitHub Desktop.
Mochi - example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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