author | wenzelm |
Tue, 17 Mar 2009 12:10:42 +0100 | |
changeset 30556 | 7be15917f3fa |
parent 27015 | f8537d69f514 |
child 38430 | 254a021ed66e |
permissions | -rw-r--r-- |
theory ToyList imports Datatype begin datatype 'a list = Nil ("[]") | Cons 'a "'a list" (infixr "#" 65) primrec app :: "'a list => 'a list => 'a list" (infixr "@" 65) where "[] @ ys = ys" | "(x # xs) @ ys = x # (xs @ ys)" primrec rev :: "'a list => 'a list" where "rev [] = []" | "rev (x # xs) = (rev xs) @ (x # [])"