Fork me on GitHub

Hi, I remember I saw something somewhere about Specter supporting iteration over multiple sequences (like Clojure's map does). Maybe, it was an explanation why Specter doesn't have this; anyway, I can't find the link. Can anyone help? A pointer how to work around this problem would be nice too. Thanks!


@alexyakushev no, Specter doesn't support that


besides questions of how to do a performant implementation of that, there's questions of semantics too


for instance, what would an ALL transform on a vector and a map produce?


@nathanmarz Yeah, I thought it was something along these lines. map was always an outlier among other sequence processing functions, it makes sense that Specter doesn't have it. Regarding my problem, I need to merge two lists of lists of lists of maps. Without Specter, I solved it with an abhorrent lasagna of (partial map ...). Can Specter help here somehow?


I had an idea open awhile ago that would have helped, or an extension of it


basically you locate the specific paths to elements you care about, then use the element-specific path to get the corresponding value in the other data structure


locate is complicated to implement especially for substructure navigators like srange


I hadn't thought before about how something like locate would help with processing multiple data structures together


@nathanmarz Thanks! This is still quite helpful.


I ended up implementing something different than locate as described in that ticket, but this might be worth considering again


Having a broader set of use cases would be needed to understand how to spec the new operation