Quantcast
Channel: The purpose of the Traversable typeclass - Stack Overflow
Browsing latest articles
Browse All 4 View Live

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 Article



Answer 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 Article

Answer 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 Article

The 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
Browsing latest articles
Browse All 4 View Live




Latest Images