mirror of
https://github.com/Lysxia/first-class-families.git
synced 2024-09-11 19:47:12 +03:00
README: Example usage of Map
This commit is contained in:
parent
2cfa23b4af
commit
7c354bac67
@ -19,6 +19,12 @@ type instance Eval (FromMaybe a 'Nothing) = a
|
||||
type instance Eval (FromMaybe a ('Just b)) = b
|
||||
```
|
||||
|
||||
That way, the `FromMaybe` constructor can be passed to higher-order fcfs.
|
||||
|
||||
```haskell
|
||||
Eval (Map (FromMaybe 0) '[ 'Just 1, 'Nothing ]) = '[ 1, 0 ] :: [Nat]
|
||||
```
|
||||
|
||||
Essential language extensions:
|
||||
|
||||
```haskell
|
||||
|
Loading…
Reference in New Issue
Block a user