fix mapSome/mapNone leave monadic context
This commit is contained in:
parent
8a7998712d
commit
9e808c846e
1 changed files with 2 additions and 2 deletions
|
|
@ -64,8 +64,8 @@ in rec {
|
|||
in
|
||||
assert enfIsMaybe value "mapMaybe"; value;
|
||||
|
||||
mapSome = f: mapMaybe f id;
|
||||
mapNone = mapMaybe id;
|
||||
mapSome = f: mapMaybe f (_: None);
|
||||
mapNone = mapMaybe (x: Some x);
|
||||
|
||||
# Utility Functions
|
||||
boolToMaybe = x:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue