Updated prelude
This commit is contained in:
parent
5a7332f3a8
commit
476d566468
1 changed files with 6 additions and 2 deletions
|
|
@ -203,9 +203,13 @@ prelude =
|
|||
, "printChar : Char -> Unit"
|
||||
, "printChar = \\x. Unit"
|
||||
, "\n"
|
||||
, "flipConst : a -> b -> a"
|
||||
, "flipConst x y = y"
|
||||
, "\n"
|
||||
, "printStr : List Char -> Unit"
|
||||
, "printStr xs = case xs of"
|
||||
, " Nil => Nil"
|
||||
, " Cons x xs => Cons (printChar x) (printStr xs)"
|
||||
, " Nil => Unit"
|
||||
, " Cons x xs => flipConst (printChar x) (printStr xs)"
|
||||
, "\n"
|
||||
, "data List a where"
|
||||
, " Cons : a -> List a -> List a"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue