pel_daniel
Hi! I created some animations to explain what happens internally with map & reduce functions.
The code is open source. Any feedback is welcome !
https://lambdabricks.github.io/animating-hofs/
Trending in Guides/Tuts
I’ve spent some time understanding how to do hot code reloading with releases built using mix release, and here I’d like to detail the st...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
OvermindDL1
Heh, that’s cool looking.
pel_daniel
Thanks @OvermindDL1!
grych
Nice, I finally understood reduce!
pel_daniel
Great to hear it @grych !
grych
It was a joke. Bad one, sorry!
Anyway, I like your animation and I am sure it is going to help to understand the functional approach. You might try to add more examples on reduce, like traversing the list of strings with counting the overall number of characters (to show that the reduced value doesn’t have to be the same type as an enumerable member), etc.
Great job!
AstonJ
Love it Daniel
It reminds me of this screencast by Joe Armstrong:
OvermindDL1
I’d definitely say add
Enum.flat_mapif you are wanting to show the basics, it is one of the basic monad operators.AstonJ
Also just a quick thought - could you make it so that it takes a copy and works on (or makes obvious it’s) the copy? At the moment anyone new might thing it is altering the starting data, rather than returning a copy
pel_daniel
Thanks for the comments !
I’ve been thinking about how to make the list in the animation appear immutable but I don’t have a solution for it yet. Do you have any suggestions on how to do it Aston ?
pel_daniel
At the beginning I was thinking of doing:
map,reduce&filterbecause are the most common HOF.Filter is a bit more difficult to represent visually because it uses an
ifstatement.flat_mapwould be also cool with examples from differentMonads.