Added .crf to every sample-program
This commit is contained in:
parent
9ea3a3dc56
commit
ccfae19541
10 changed files with 23 additions and 23 deletions
|
|
@ -1,28 +1,28 @@
|
||||||
-- data Maybe (a) where {
|
data Maybe () where {
|
||||||
-- Nothing : Maybe (a)
|
Nothing : Maybe
|
||||||
-- Just : a -> Maybe (a)
|
Just : Int -> Maybe
|
||||||
-- };
|
};
|
||||||
|
|
||||||
-- fmap : (a -> b) -> Maybe (a) -> Maybe (b) ;
|
fmap : (Int -> Int) -> Maybe -> Maybe ;
|
||||||
-- fmap f ma = case ma of {
|
fmap f ma = case ma of {
|
||||||
-- Nothing => Nothing ;
|
Nothing => Nothing ;
|
||||||
-- Just a => Just (f a) ;
|
Just a => Just (f a) ;
|
||||||
-- };
|
};
|
||||||
|
|
||||||
-- pure : a -> Maybe (a) ;
|
pure : Int -> Maybe ;
|
||||||
-- pure x = Just x ;
|
pure x = Just x ;
|
||||||
|
|
||||||
-- ap mf ma = case mf of {
|
ap mf ma = case mf of {
|
||||||
-- Just f => case ma of {
|
Just f => case ma of {
|
||||||
-- Nothing => Nothing;
|
Nothing => Nothing;
|
||||||
-- Just a => Just (f a);
|
Just a => Just (f a);
|
||||||
-- };
|
};
|
||||||
-- Nothing => Nothing;
|
Nothing => Nothing;
|
||||||
-- };
|
};
|
||||||
|
|
||||||
-- return = pure;
|
return = pure;
|
||||||
|
|
||||||
-- bind ma f = case ma of {
|
bind ma f = case ma of {
|
||||||
-- Nothing => Nothing ;
|
Nothing => Nothing ;
|
||||||
-- Just a => f a ;
|
Just a => f a ;
|
||||||
-- };
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue