by nimish · 13y ago · 0 comments
You can derive "internal" iterators using Traversable but it's not like zip is difficult to implement.
The reason is that you need to operate on multiple containers at once and that is what Applicative's (<*>) provides, while Traversable only requires Functor and can therefore only traverse one container at a time.
So what Haskell has is just internal iteration, but we have another interface for internal iteration on multiple containers that allows zip to be implemented easily.