specter

Latest version: 1.1.3
nathanmarz 2018-02-13T14:15:31.000371Z

Handy cheat sheet contributed by @djebbz https://github.com/nathanmarz/specter/wiki/Cheat-Sheet

👍 2
johanatan 2018-02-13T22:51:01.000519Z

hi, if i'm transform over [specter/MAP-VALS :some-key] and inside my transform i want/need to access the KEY-VAL corresponding to the particular MAP-VAL that i'm in, is that possible? or do these cases always degenerate into a case of [specter/ALL] with drilling down required inside the transform-fn

nathanmarz 2018-02-13T23:30:02.000318Z

@johanatan accessing the key while transforming a map val is expressed as (transform [ALL (collect-one FIRST) LAST] ...)

johanatan 2018-02-13T23:30:28.000063Z

ah, nice. what would be the signature be for capturing the key and the value?

johanatan 2018-02-13T23:30:35.000277Z

just [[k v]] ?

johanatan 2018-02-13T23:31:06.000085Z

[the transform-fn signature that is]

johanatan 2018-02-13T23:32:16.000424Z

and also can you have additional filters (such as the kwd in my example) after the LAST ?