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 | 6a6c98d74f0eb61b52e8adc5385698a224eeccc1 (patch) | |
tree | bc9e633b76c75ea47d6cfdb826c549ed7cd4c66a /demo/tcSum.ur | |
parent | 3cb644caeed50e5c82778b5ed7c165950655109a (diff) |
Demo compiles with pattern-matching-fu
Diffstat (limited to 'demo/tcSum.ur')
-rw-r--r-- | demo/tcSum.ur | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demo/tcSum.ur b/demo/tcSum.ur index 13cefc39..57e61c38 100644 --- a/demo/tcSum.ur +++ b/demo/tcSum.ur @@ -1,6 +1,6 @@ -fun sum (t ::: Type) (_ : num t) (fs ::: {Unit}) (fl : folder fs) (x : $(mapU t fs)) = +fun sum [t] (_ : num t) [fs ::: {Unit}] (fl : folder fs) (x : $(mapU t fs)) = foldUR [t] [fn _ => t] - (fn (nm :: Name) (rest :: {Unit}) [[nm] ~ rest] n acc => n + acc) + (fn [nm :: Name] [rest :: {Unit}] [[nm] ~ rest] n acc => n + acc) zero [fs] fl x fun main () = return <xml><body> |