Why Nostr? What is Njump?
2024-08-20 21:39:20
in reply to

shikanoko nokonoko on Nostr: Start by getting a feel for transducers by doing regular sequence processing, e.g ...

Start by getting a feel for transducers by doing regular sequence processing, e.g (into [] (map inc) [1 2 3 4]), (into [] (comp (map inc) (filter even?)) [1 2 3 4]) and things like that.

Then try implementing the basic transducer functions like map, filter etc. take is an interesting one, as it's stateful and terminates itself, via the reduced mechanism.

I'd drop implementing the context transducers yourself, it's very complicated for reasons orthogonal to transducers. There's nothing particularly interesting about the implementation of no.olavfosse.context, aside from how well it encapsulates the complexity.

Please do try them out though!

Transducers are really simple, but took me a long time to really grok.

Just give them some time and I'm sure they'll find their place in your mind.
Author Public Key
npub13ekvakh3kyjqz47r2pckkgnf4a8h9gmmm9smwu5ha7fqzrd6xuwqhpw73a