beginners

Ramin Soltanzadeh 2026-04-12T19:33:35.956459Z

I have a decent understanding of how transducers work, but I do not yet fully grasp the completion arity, especially when it comes to stateful transducers. Is there any good resource that dives deeply into this?

p-himik 2026-04-12T19:41:32.015849Z

You might find that anything that dives deep into it ends up being ankle-deep. :) The completing arity is useful for when a transducer needs something as the very last step. Simple transducers that are produced by e.g. map, filter, take don't need anything at the last step. More complex transducers (e.g. produced by partition-by, partition-all, halt-when) need it to finish up their work. Check out the implementations of those functions if you're curious to see what they're doing for completion.

Ramin Soltanzadeh 2026-04-12T19:47:38.461649Z

Good idea studying source code. I'll do that, thanks.

p-himik 2026-04-12T19:48:16.588679Z

Reading sources is 50% of how I myself learned Clojure. :)

Ramin Soltanzadeh 2026-04-12T19:52:28.533069Z

Even I as a beginner feel like it is so much easier to do that in Clojure. It feels like the language is able to simply express the author's thoughts. Outside of Clojure it feels like I am chasing the author's thoughts through a long maze of indirection and syntax.

Ramin Soltanzadeh 2026-04-12T19:53:53.028399Z

There is probably a skill difference too between Clojure authors and the rest. Should not be discounted.

p-himik 2026-04-12T21:30:58.107219Z

Yeah, I remember also learning C++ that way. :D "So how does the << operator work for streams? [Two hours later] Well, I think I get it. Somewhat. But that was for MSVC, and what about GCC?"