Task.andThen simplifications as hinted at in #2 and more.
These are equivalent to Result.andThen with different type properties so effectively free.
Task.andThen f (Task.fail x)
--> Task.fail x
Task.andThen f (Task.succeed a)
--> f a
Task.andThen Task.succeed task
--> task
Task.andThen (\a -> Task.succeed b) task
--> Task.map (\a -> b) x
map and mapN are also effectively free. Same with onError (andThen with fail as wrap) and mapError (map with fail as wrap).
Task.andThen
simplifications as hinted at in #2 and more. These are equivalent toResult.andThen
with different type properties so effectively free.map
andmapN
are also effectively free. Same withonError
(andThen with fail as wrap) andmapError
(map with fail as wrap).