Mercurial > urweb
view tests/recBad.lac @ 240:7036d29574f2
Shorthand for multi-binding con declaration
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 28 Aug 2008 13:39:20 -0400 |
parents | fc6f04889bf2 |
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 ())