diff options
Diffstat (limited to 'TUTORIAL.md')
-rw-r--r-- | TUTORIAL.md | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/TUTORIAL.md b/TUTORIAL.md index e0017d6..30e7d62 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -466,3 +466,29 @@ n saved > (fibonacci n) 34 : Int ``` + + +Exercise 3: Generic functions – the identity +-------------------------------------------- + +Write the identity function for any type. + +This should make you familiar with typing function +definitions that contain generics. + + +Exercise 4: Map left / right (integers) +--------------------------------------- + +Write functions `map-left` and `map-right` that take a +coproduct and a function and map the corresponding side of +the given coproduct using the given function. + +Note: the solution is not in the same directory as the rest, +but you can find implementations for these in the standard +library. + +This exercise will train your abilities to use generics more +than the last one. You will get familiar with coproducts. + + |