What's the most standard/generic way to zip a traversable with a list?
Traversable is in a sense the class of containers whose structure has a “path” (that can correspond to a list), the elements on which can be modified without dissolving the structure. Hence zipTrav :: Traversable t => t a -> [b] -> Maybe (t (a,b)) zipTrav = evalStateT . traverse zp where zp a = do bs <- get case bs of [] -> lift Nothing (b:bs') -> put bs' >> return (a,b) However, that list-state traversal seems a bit hackish and likely not the most efficient way to do it. I'd suppose there would be a standard function that accomplished the above or a more general task, but I can't figure out