specter

Latest version: 1.1.3
currentoor 2019-07-07T17:48:52.011500Z

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

currentoor 2019-07-07T17:49:10.011700Z

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

currentoor 2019-07-07T17:49:17.012Z

this removes all the matches

oskarkv 2019-07-07T19:06:32.012500Z

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

currentoor 2019-07-07T19:06:46.012700Z

cool thanks!

oskarkv 2019-07-07T19:08:22.013100Z

Or, hm it doesn't work as I expected

oskarkv 2019-07-07T19:12:39.013600Z

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

oskarkv 2019-07-07T19:12:54.014Z

@currentoor Did you notice?

currentoor 2019-07-07T19:14:28.014200Z

yeah i would too

currentoor 2019-07-07T19:14:52.015Z

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

currentoor 2019-07-07T19:14:56.015200Z

so this works

oskarkv 2019-07-07T19:14:59.015400Z

hehe