chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New egg: CHICKEN Transducers


From: Jeremy Steward
Subject: New egg: CHICKEN Transducers
Date: Wed, 4 Jan 2023 18:48:56 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.6.0

Hey all,

I've been somewhat bothered by the fragmentation in a certain aspect of Scheme / Lisp: notably that there isn't really something akin to Rust's Iterator trait in Scheme, and as a result working across various collections and data types is a pain.

So I introduce to you - Transducers! These are very similar to Clojure's transducers, but add one more parameter: a fold procedure. I was unhappy with SRFI-158 (Generators & Accumulators) and also unhappy with SRFI-171 (mostly because of how sparse the API is).

test-new-egg passes with the following release-info:

<https://gitlab.com/ThatGeoGuy/chicken-transducers/-/raw/main/transducers.release-info>

I've already added extensive documentation to the wiki page:

<https://wiki.call-cc.org/eggref/5/transducers>

And I've written a short blog post outlining some of my frustrations that led me to writing this egg:

<https://www.thatgeoguy.ca/blog/2023/01/04/reflections-on-transducers/>

Happy to engage with the rest of the community on what the next priority for such a library should be. My hope is that this library helps us all move away from XXX-map and XXX-filter procedures for each individual type.

First things first: I'll probably keep trying to add more common data type support (SRFI 146 mappings and SRFI 69 hash-tables come to mind) as I can. Let me know if you find this useful!

Cheers,
--
Jeremy Steward



reply via email to

[Prev in Thread] Current Thread [Next in Thread]