"Transducers" by Rich Hickey
Channel:Strange Loop Conference · Length:45:00 · Published:2014-09-19 · Views:115756
Summary
Rich Hickey introduces transducers in Clojure, a way to make map, filter and similar algorithms composable independent of the data source. This avoids duplicated implementations and intermediate collections across sequences, channels and streams.
Why HN recommends it
HN treats it as the original and definitive explanation of transducers, recommended whenever the concept comes up.
If you want a really good intro, watch Rich Hickey's talk about transducers — HN, 2025
Functional programming · Software architecture & design
Subtitles (excerpt)
transducers of course everything is just some combination of the same ingredients and the shell is on the outside it's on inside the cheese is in it's on top whatever um I'm not claiming any novelty here this is just another rearrangement of the same old stuff as usual um but you know sometimes the cheese on top you know tastes better than when it's inside all right so what are transducers the basic idea is to go and look again at map and filter and see if there's some idea inside of them that could be made more reusable than map and filter because we see map and filter being implemented over and over again in different contexts right we have map and filter on collections we have map and filter on streams we have map and filter on observables we were starting to WR write map and filter and and so on on uh channels and there was just there's no sharing here there's no ability to create reusable things so we want to take the essence out and see if we can reuse them uh and the way that we're going to do that is by recasting them as process Transformations and I I'll talk a lot more about that but that's essentially the entire idea recasting the the core logic of these what were sequence processing
On Hacker News
Transducers are IMHO one of the most under-appreciated features of Clojure. If you want a really good intro, watch Rich Hickey's talk about transducers: [VIDEO] (Rich is an excellent speaker and most of his talks are really worth watching, even if you don't use Clojure). The thing about transducers is that once you start using them, the abstractions click in your mind and you start using them mor… — jwr, 2025-11
Quick nit/question. For the fold method, I don't think I've seen it called sentinel value. Usually it is seed or initial? I think in Scheme it is common to call it knil, mirroring how lists use nil as the "sentinel" value which marks the end of a proper list. I opted to name it sentinel in that article (and in the docs) for two reasons: 1. Sentinel values are a common topic in many languages [LIN… — ThatGeoGuy, 2024-08
Rich gave a talk on this, and there is an associated HN thread for the talk, but some of you may be interested in the original transducers presentation. You can view it here: [VIDEO] — devin, 2023-09
Transducers. See Richard Hickey's talk about transducers here: [VIDEO] You can implement transducers in JavaScript using generators. It was somewhat mind bending but fun. — talkingtab, 2022-11
Here's another video by Rick Hickey about transducers: [VIDEO] - it was referenced in this great post detailing the transducer notion with Clojure, Scala, and Haskell: [LINK] — ultimape, 2014-11
Related videos
- Meaningful Play: Getting Gamification Right · Google TechTalks · 49:57
- Jonathan Blow: Video Games and the Human Condition · rubbermuck · 1:44:09
- Cities Aren't Loud: Cars Are Loud · Not Just Bikes · 17:08
- Brian Goetz - Stewardship: the Sobering Parts · ClojureTV · 1:03:30
- John Hughes - Testing the Hard Stuff and Staying Sane · ClojureTV · 47:17
- Clojure Concurrency - Rich Hickey · ClojureTV · 2:32:38
- Ruby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich · Confreaks · 53:21
- RailsConf 2014 - All the Little Things by Sandi Metz · Confreaks · 38:47
- The Soul of Erlang and Elixir • Sasa Juric • GOTO 2019 · GOTO Conferences · 42:02
- "Simple Made Easy" - Rich Hickey (2011) · Strange Loop Conference · 1:01:38
- "Making Impossible States Impossible" by Richard Feldman · elm-conf · 25:06
- William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC] · PapersWeLove · 1:31:05
- How To Design A Good API and Why it Matters · Google TechTalks · 1:00:19
- The Value of Values with Rich Hickey · InfoQ · 31:43
- Why Isn't Functional Programming the Norm? – Richard Feldman · Metosin · 46:09
- Overwatch Gameplay Architecture and Netcode · GDC Festival of Gaming · 1:04:03