Login
You're viewing the slime.global public feed.

Replies

  • Oct 21, 2026, 3:13 AM

    @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)`)

    💬 1🔄 0⭐ 0
  • Oct 21, 2026, 3:22 AM

    @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

    💬 1🔄 0⭐ 0
  • Oct 21, 2026, 4:11 AM

    @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)

    💬 0🔄 0⭐ 0