Commit 9fafa959 authored by John van Groningen's avatar John van Groningen

rename functions u_isJust and u_isNothing to isJustU and isNothingU

parent 1c845434
...@@ -15,14 +15,14 @@ isNothing :: !(Maybe .x) -> Bool // not o isJust ...@@ -15,14 +15,14 @@ isNothing :: !(Maybe .x) -> Bool // not o isJust
fromJust :: !(Maybe .x) -> .x // \(Just x) -> x fromJust :: !(Maybe .x) -> .x // \(Just x) -> x
// for possibly unique elements: // for possibly unique elements:
u_isJust :: !u:(Maybe .x) -> (!Bool, !u:Maybe .x) isJustU :: !u:(Maybe .x) -> (!Bool, !u:Maybe .x)
u_isNothing :: !u:(Maybe .x) -> (!Bool, !u:Maybe .x) isNothingU :: !u:(Maybe .x) -> (!Bool, !u:Maybe .x)
mapMaybe :: .(.x -> .y) !(Maybe .x) -> Maybe .y mapMaybe :: .(.x -> .y) !(Maybe .x) -> Maybe .y
// mapMaybe f (Just x) = Just (f x) // mapMaybe f (Just x) = Just (f x)
// mapMaybe f Nothing = Nothing // mapMaybe f Nothing = Nothing
instance == (Maybe x) | == x instance == (Maybe x) | == x
// Nothing==Nothing // Nothing==Nothing
// Just a ==Just b <= a==b // Just a ==Just b <= a==b
......
...@@ -18,16 +18,16 @@ isNothing :: !(Maybe .x) -> Bool ...@@ -18,16 +18,16 @@ isNothing :: !(Maybe .x) -> Bool
isNothing Nothing = True isNothing Nothing = True
isNothing _ = False isNothing _ = False
u_isJust :: !u:(Maybe .x) -> (!Bool, !u:Maybe .x) isJustU :: !u:(Maybe .x) -> (!Bool, !u:Maybe .x)
u_isJust nothing=:Nothing isJustU nothing=:Nothing
= (False, nothing) = (False, nothing)
u_isJust just isJustU just
= (True, just) = (True, just)
u_isNothing :: !u:(Maybe .x) -> (!Bool, !u:Maybe .x) isNothingU :: !u:(Maybe .x) -> (!Bool, !u:Maybe .x)
u_isNothing nothing=:Nothing isNothingU nothing=:Nothing
= (True, nothing) = (True, nothing)
u_isNothing just isNothingU just
= (False,just) = (False,just)
fromJust :: !(Maybe .x) -> .x fromJust :: !(Maybe .x) -> .x
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment