Skip to main content
4 events
when toggle format what by license comment
Jan 4, 2018 at 10:30 comment added nilern @Jules I think returning Left does not prevent the fold from visiting the entire list (or other sequence). Not intimately familiar with Haskell standard library internals though.
Jan 4, 2018 at 10:26 comment added Jules Re using error monads in Haskell, I don't believe there is any real performance penalty here. They tend to get thought of along the lines of exception handling, but they don't work the same way and there isn't any stack walking required, so really shouldn't be a problem if used this way. Also, even if there's a cultural reason not to use something like MonadError, the basically-equivalent Either has no such bias towards only error handling, so can easily be used as a substitute.
Jan 4, 2018 at 10:13 review First posts
Jan 4, 2018 at 13:16
Jan 4, 2018 at 10:13 history answered nilern CC BY-SA 3.0