diff --git a/code/compiler/11/examples/works3.txt b/code/compiler/11/examples/works3.txt index 2123089..cfd2ef3 100644 --- a/code/compiler/11/examples/works3.txt +++ b/code/compiler/11/examples/works3.txt @@ -1,4 +1,4 @@ -data List = { Nil, Cons Int List } +data List a = { Nil, Cons a (List a) } data Bool = { True, False } defn length l = { case l of { @@ -6,4 +6,4 @@ defn length l = { Cons x xs -> { 1 + length xs } } } -defn main = { length (Cons True (Cons False (Cons True Nil))) } +defn main = { length (Cons 1 (Cons 2 (Cons 3 Nil))) + length (Cons True (Cons False (Cons True Nil))) }