churf/sample-programs/basic-0.crf

20 lines
238 B
Text

data Bool () where
True : Bool ()
False : Bool ()
not x = case x of
True => False
False => True
even : Int -> Bool ()
even x = not (odd x)
odd x = not (even x)
main = case even 64 of
True => 1
False => 0