mudasobwa
Iteraptor :: Iterating Nested Terms Like I’m Five
The library to easily map/each/reduce/map_reduce/filter deeply nested maps/keywords/lists, called Iteraptor has been released. Besides standard map-reduce operations, it allows flattening nested terms and deflattening them back, and provides a couple of helper methods for low-level traversing them.
There is a blog post describing the interface in details, and Hexdock.
We were using it in production for months, but since we were not able to catch more bugs on our limited set of nested structures, I would be glad to hear about other use-cases where it fails to traverse the nesteds properly.
Also, it’s extremely handy when one needs to filter out some deeply nested keys, or get just the second level of a nested map, or produce a flattened keyword list out of external config file ![]()
Most Liked
Qqwy
This kind of functionality seems like the perfect fit for Property-based testing ![]()
gon782
Indeed, that was my immediate thought as well.
@mudasobwa what is the reasoning behind the names of some of the operations? I would expect each to never return anything, for example, as well as for map to preserve the structure of the thing it’s mapping over. These are standard behaviors connected with the terminology in FP as far as I know and I assume most people familiar with it would expect the same.
mudasobwa
the perfect fit for Property-based testing
Thanks for the suggestion, I’ll do. I am pretty sure though that there is no perfect testing environment where all the issues might be covered, that’s why I kindly asked for bug reports, if any.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








