Fork me on GitHub
#meander
<
2020-03-25
>
grounded_sage10:03:56

I keep working on the assumption that [{:key ?value} …] is the same as (m/scan {:key ?value}) Sometimes it works and sometimes it doesn’t. What am I not getting? lol

Jimmy Miller13:03:30

If you look at the docstring of scan you will see it is equal to [_ ... pattern . _ ...]. So unlike a simple repeat scan can skip over elements.

grounded_sage16:03:03

I’m starting to grok how this works. With respect to when I read the code lol. Ignore, repeat ignore, match pattern, stop point for next repeats, ignore, repeat ignore.

noprompt02:03:01

There’s also map-of and submap-of which will kinda sorta work like scan.

Jimmy Miller04:03:50

And gather which is like filter. I think many places people are using scan they could use gather and not use search.

👍 4
grounded_sage09:03:56

I use cljdoc to look at documentation. Those ones are not in there. Could be due to it failing the build. @U06MDAPTP @U5K8NTHEZ

Jimmy Miller13:03:32

I'll fix that today. Sorry about that. You can go back one version to look at them.

grounded_sage15:03:21

All good! Appreciate all the work you guys are doing! I couldn’t imagine writing this 120 line meander function for transforming deeply nested json any other way

noprompt16:03:42

They’re also available in the doc folder in the repo. 🙂

Jimmy Miller17:03:54

The only problem was the API docs from the doc strings.

grounded_sage20:03:50

I think I was also using it a bit wrong on cljdoc. Also my bad :p