specter

agh2o 2021-09-20T10:30:42.037Z

Hi, I was wondering if there is a way to do something along these lines:

(specter/some-func
  [s/ALL s/ALL keyword?]
  [1 2 3]
  [(:akeyword true) (:akeyword false) (:akeyword false)]) => [(1 true) (2 false) (3 false)]
Meaning navigate to a subsequnce and replace it with another sequence in place. I thought about using transform with a impure function that returns the next item on every call, but i'm assuming there is a better way. thanks in advance :

agh2o 2021-09-20T12:45:24.038100Z

I'm thinking, if the transform would optionally supply the index of the item to the given function. the function could be pure and give the next item...

nathanmarz 2021-09-20T15:25:06.039Z

@idosilverwater you're looking for subselect

agh2o 2021-09-20T16:01:24.039300Z

great! thank you