Double traversing ziplists - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Asad Saeeduddin

Is it true that sequenceA . sequenceA = id :: ZipList (ZipList a) -> ZipList (ZipList a)?

Asad Saeeduddin

no it's not:

sequenceA . sequenceA $ Z [Z [1, 2, 3], Z [4, 5]]

Z [Z [1,2], Z[4,5]]
Asad Saeeduddin

it is however true that sequenceA . sequenceA = id :: Maybe (Maybe a) -> Maybe (Maybe a)