3:40 PM
I read in LYAH that the Either monad is commonly used for error handling (Left is an error message, Right is a successful value). Is it idiomatic to use it in a situation where I want to return one of two types, neither of which is an error? Or is there a better way to do that?
Context: In the golflang I'm implementing, I have a Function type. Functions are curried and have a fixed arity. When I apply a Function to a Value, if its arity is 1, the result is a Value; but if its arity is greater than 1, the result is another Function. My current solution feels pretty kludgy, and I was hoping to replace it with something more elegant.
« first day (1810 days earlier) ← previous day next day → last day (153 days later) »
Transcript for
Sep11
Sep '2217
Sep23
Of Monads and Men
For discussion about, learning of and golfing in Haskell codeg...