@typeswitch hey that rules, thank you
0 Boosts
0 Likes
@zmz @typeswitch gonna be honest i'd never encountered traverse before this project but i got *really* excited when i started to understand it. i'm still not sure i understand it
@mcc @typeswitch `traverse` performs some effect on each element of a structure in some canonical traversal order. The flexibility comes from the fact that it's parameterized over both the structure (the Traversable) and the the effect (the Applicative) (excuse the Haskell instead of Idris, but it should be similar)
@mcc @typeswitch there's a meme in Haskell, "it's always `traverse`", because `traverse :: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)` is useful for a lot of different things with the right choices of `f` and `t`. (in this case `f = IO`, `t = List`, and `for_ xs f = void (traverse f xs)`)