First of all, thank you for making dry-monads. I really like the API and the way you have managed to give us something akin to do notation. My code is (at least to me) much clearer and much more solid with it. Having done some Haskell and Scala before, I also enjoy how familiar it all feels.
That familiarity is actually what motivates me to write. Shouldn’t List’s traverse
be called sequence
? Haskell’s traverse
requires a function that will map each traversed item to an Applicative in order to produce the result with the Applicative on the outside and the mapped values in a new Traversable on the inside (traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
). sequence
, on the other hand, has a Monad
constraint and already presumes you’re dealing with a Traversable
containing monadic values (sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)
) – which is what dry-monads’ traverse
does.