Fork me on GitHub
#specter
<
2019-02-21
>
roklenarcic11:02:24

Is there some way to say STAY if SUBPATH 1 and SUBPATH 2 match

roklenarcic11:02:43

I cannot find a way to check if two subpaths are both present

roklenarcic11:02:16

to implement collecting an item if prop1 = x and prop2 = y

roklenarcic12:02:13

used multiple selected? to accomplish that

eoliphant22:02:46

hi I’m trying to figure out how exactly INDEXED-VALS works. Like the example . For say [0 1 2 3 4], I want to move say the 3 at index 3, to say the 0th or some other index. The select is clear to me, basically like map-indexed. But I’m not quite grokking what’s happening in the setval example. This looks like it would do something like set all the indicies to 0. (sp/setval [sp/INDEXED-VALS sp/FIRST] 0 [0 1 2 3 4]) but say (sp/setval [sp/INDEXED-VALS sp/FIRST 2] 0 [0 1 2 3 4]) would move 2 to the front of the list. That’s obviously not how it works lol

nathanmarz22:02:46

it traverses the values in order, so it moves them all to index 0 in order, having the effect of reversing the vector

nathanmarz22:02:57

you can move just one particular value like this:

user=> (setval [INDEXED-VALS (selected? LAST (pred= 3)) FIRST] 0 [0 1 2 3 4])
[3 0 1 2 4]

nathanmarz22:02:32

but index-nav is better for moving one value at a specific position:

user=> (setval (index-nav 3) 0 [0 1 2 3 4])
[3 0 1 2 4]