This commit is contained in:
nora 2021-07-08 17:07:02 +02:00
parent c52bc19021
commit 940f03eb01

View file

@ -0,0 +1,15 @@
module Main
surrond_with_braces : String -> String
surrond_with_braces x = "{" ++ x ++ "}"
allLengths : List String -> List Nat
allLengths strs = map length strs
invert : Bool -> Bool
invert True = False
invert False = True
describeList : Show a => List a -> String
describeList [] = "Empty"
describeList (x :: xs) = "Non-empty (" ++ show x ++ "), tail = " ++ show xs