Task.onError, the andThen for failing tasks (that I wish result etc had as well).
Task.onError f (Task.succeed a)
--> Task.succeed a
Task.onError f (Task.fail x)
--> f x
Task.onError Task.fail task
--> task
Task.onError (\x -> Task.fail y) task
--> Task.mapError (\x -> y) x
Bonus: Minor improvements to the tests of Result.andThen and Task.andThen
Task.onError
, theandThen
for failing tasks (that I wish result etc had as well).Bonus: Minor improvements to the tests of
Result.andThen
andTask.andThen