diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-05-28 10:35:25 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-05-28 10:35:25 -0400 |
commit | f4799004f028094c775c824409bac4e3590b2421 (patch) | |
tree | bc9e633b76c75ea47d6cfdb826c549ed7cd4c66a /demo/list.ur | |
parent | 072ba13540fd884e01c8d2aab31853594825e000 (diff) |
Demo compiles with pattern-matching-fu
Diffstat (limited to 'demo/list.ur')
-rw-r--r-- | demo/list.ur | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demo/list.ur b/demo/list.ur index 107bf92c..961708ea 100644 --- a/demo/list.ur +++ b/demo/list.ur @@ -1,6 +1,6 @@ datatype list t = Nil | Cons of t * list t -fun length (t ::: Type) (ls : list t) = +fun length [t] (ls : list t) = let fun length' (ls : list t) (acc : int) = case ls of @@ -10,7 +10,7 @@ fun length (t ::: Type) (ls : list t) = length' ls 0 end -fun rev (t ::: Type) (ls : list t) = +fun rev [t] (ls : list t) = let fun rev' (ls : list t) (acc : list t) = case ls of |