Closed Avaq closed 4 years ago
I like this change. I don't know about the notation, though. Throwing e (a -> b)
should probably be Throwing e a b
, because a -> b
is sugar for Fn a b
and Throwing e (Fn a b)
doesn't make sense to me. Another option is just to replace Error
with e
and explain in the description how the type of e
is determined. What do you think?
Throwing e (a -> b)
should probably beThrowing e a b
You're totally right. I will also update Fluture's encase
docs accordingly!
Something like this:
Because I'm getting bitten by the fact that I expect a function to be safe after using
encase
, only to find out that it now throws a TypeError because the function I've encased throws a String.