There are a lot of functions that accomplish the same thing, but using
Some examples are:
In the scenario that prompted this question, I wanted to
mapM where the
In general, when it is known that the result will be the same, is it better style to use the
Applicative ones or the
Monad ones? E.g., is one more readable than another, or maybe faster than the other?
Edit (in response being suggested as a duplicate): Personally, I find these to be equally readable. I am in no way asking about maintainability, as these can be used interchangeably, and preferring one over another would have no impact on the code structure. I'm really wondering if one is more idiomatic, or more efficient, than the other.