Crowd-sourcing how to traverse a nested data structure in different programming languages
we now have 85+ solutions across 35+ languages
I had a use case come up while developing an Elixir application that involved wanting to perform a nested loop while mutating 2 counters and a map. The repo has a full description of the problem.
I was able to solve it using Elixir, but I’m new to functional programming, so it took a bit of elbow grease and assistance to get a working solution.
After talking over the problem on IRC, José came up with a wonderful idea: to tweet out an open request to all developers and see how the community would solve the problem using their language of choice.
Edit October 10, 2022: The tweet has since been deleted, it originally said:
Within 24 hours there were just under 100 submissions across 35 languages! Everything from APL (which looks like alien hieroglyphics mixed with encrypted NES cheat codes) to Wenyan (which is an Ancient Chinese programming language).
If you’d like to submit a solution, please head over to the repo and check out the README. Multiple submissions for a single language are OK as long as your implementation is different from what already exists for that language.
Edit October 10, 2022: The repo is now archived and new solutions are no longer being accepted.
Discussion
Sign in or Join to comment or subscribe
Robin Denton
2022-10-10T11:54:18Z ago
None of the links on this page are working
Jerod Santo
Bennington, Nebraska
Jerod co-hosts The Changelog, crashes JS Party & takes out the trash (his old code) once in awhile.
2022-10-10T14:39:31Z ago
Hmm, it appears José has since renamed the repo to: nested-map-reduce-traversal
I’ll update the post to point to the rename ✊
Robin Denton
2022-10-10T14:47:56Z ago
Thanks, nice one
Nick Janetakis
2022-10-10T15:30:39Z ago
Good catch. A few months ago I noticed it was down and started referencing https://github.com/nickjj/nested-data-structure-traversal which was slightly out of date. It’s nice to see the original is still there with a different name. I’ll update all of my references too (I had a blog post and video of it).