3

Crowd-sourcing how to traverse a nested data structure in different programming...

 3 years ago
source link: https://changelog.com/posts/how-to-traverse-a-nested-data-structure-in-different-programming-languages
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

changelog.com/posts

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.

Developers from all programming languages, I would appreciate your contribution to this problem: https://t.co/iNcl6ZORxh - PRs welcome!

Mutability makes this easier. Therefore I am also curious about how different functional programming languages tackle this. Please RT!

— José Valim (@josevalim) April 7, 2021

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.

Get the latest news and podcasts for developers in your inbox, every week. We make it super easy to keep up with developer news that matters.


Discussion

Sign in or Join to comment or subscribe


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK