Fork me on GitHub
#specter
<
2021-09-20
>
agh2o10:09:42

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 :

agh2o12:09:24

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...

nathanmarz15:09:06

@idosilverwater you're looking for subselect

agh2o16:09:24

great! thank you