Q: is there a way to “expand” a single value in a sequence with N values? e.g. (transform [ALL #{2} ] (fn [v] [20 20]) [1 2 3]) => [1 20 20 3] I have been trying something like the setval / END technique but can’t figure it out
(setval [(srange 1 2)] [20 20] [1 2 3])
I have found that sometimes using specter as an initial transformer and using other functions can often yield result you want, rather than trying to get specter to do it in one step. Hence: (vec(flatten(transform [ALL #{2}] (fn [v] [20 20]) [1 2 3])))
thanks. sometimes I try too hard to use specter paths