Fork me on GitHub
#specter
<
2019-07-07
>
currentoor17:07:52

also, is there a simple way, given a sequence, to remove the first match and leave the rest?

currentoor17:07:10

(specter/setval [specter/ALL (specter/pred= 1)] specter/NONE [1 2 1 3])

currentoor17:07:17

this removes all the matches

oskarkv19:07:32

@currentoor In that case you can do (s/setval [(s/filterer (s/pred= 1)) s/FIRST] s/NONE [1 2 1 3])

currentoor19:07:46

cool thanks!

oskarkv19:07:22

Or, hm it doesn't work as I expected

oskarkv19:07:39

game.core> (s/setval [(s/filterer (s/pred= 1)) s/FIRST] s/NONE [1 2 1 3])
[1 2 3]
I would expect [2 1 3] out

currentoor19:07:28

yeah i would too

currentoor19:07:52

but actually i just need to remove one occurrence of an element

currentoor19:07:56

so this works