Added some examples that were shown to our handledare.
This commit is contained in:
parent
b0ec5a2333
commit
e2e469d84e
6 changed files with 96 additions and 0 deletions
11
sample-programs/example-programs/ex3.crf
Normal file
11
sample-programs/example-programs/ex3.crf
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
data Maybe () where {
|
||||
Just : Int -> Maybe ()
|
||||
Nothing : Maybe ()
|
||||
};
|
||||
|
||||
demoFunc x = case x of {
|
||||
Just x => x + 24;
|
||||
Nothing => 0;
|
||||
};
|
||||
|
||||
main = demoFunc (Just 5) ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue