Fork me on GitHub
#specter
<
2019-07-06
>
oskarkv14:07:25

I don't understand compact. 😛

oskarkv15:07:55

Can anyone explain this?

> (s/setval (s/regex-nav #"(?<=( |^))[a-z]") "_" "hello world")
"_ello _orld"
> (s/select (s/regex-nav #"(?<=( |^))[a-z]") "hello world")
[["h" ""] ["e" ""] ["l" ""] ["l" ""] ["o" ""] ["w" " "] ["o" ""] ["r" ""] ["l" ""] ["d" ""]]

oskarkv15:07:44

Oh, it's because re-seq looks at "hello world", then "ello world", etc.

currentoor18:07:06

what can you do with the result of traverse that you can’t do with the result of select?