Mercurial > urweb
view tests/recBad.lac @ 239:fc6f04889bf2
Shorthand for multi-binding con 'fn'
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 28 Aug 2008 13:29:57 -0400 |
parents | 44a1663ad893 |
children | cc193f680193 |
line wrap: on
line source
datatype list a = Nil | Cons of a * list a val rec append : t ::: Type -> list t -> list t -> list t = fn t ::: Type => fn ls1 => fn ls2 => case ls1 of Nil => ls2 | Cons (h, t) => Cons (h, append t ls2) (*val rec ones : list int = Cons (1, ones)*) val rec ones = fn () => Cons (1, ones ())