Answer by hao for The purpose of the Traversable typeclass
The result type of the application f a has to be an applicative, why? Would a functor not be enough?This is a fantastic question. The original McBride & Paterson paper goes in the other direction:...
View ArticleAnswer by danidiaz for The purpose of the Traversable typeclass
Traversable in Haskell unifies the concept of mapping over a container (getting a similary-shaped container in return) with the concept of "internal iterator" that performs an effect for each...
View ArticleAnswer by leftaroundabout for The purpose of the Traversable typeclass
Identity is a bit of a poor example as it always contains exactly one value. You're right – in this case, a Functor f constraint would be sufficient. But clearly, most traversables aren't so...
View ArticleThe purpose of the Traversable typeclass
Could someone please explain to me, what is the purpose of the typeclass Traversable? The typeclass definition is:class (Functor t, Foldable t) => Traversable (t :: * -> *) whereSo Traversable is...
View Article
More Pages to Explore .....