specter icon indicating copy to clipboard operation
specter copied to clipboard

Transforming a string with the `ALL` navigator yields a reversed sequence

Open meditans opened this issue 3 years ago • 2 comments

In the current version of specter, if I transform ALL of a string I get the reversed order of characters:

(specter/transform specter/ALL identity "123")
;; => (\3 \2 \1)

I find this confusing since we have:

(specter/select specter/ALL "123")
;; => [\1 \2 \3]

and:

(specter/transform specter/ALL identity (vec "123"))
;; => [\1 \2 \3]

Is there a reason for this behavior or could we change it to the more intuitive one?

meditans avatar Jan 01 '22 11:01 meditans

ran into this today

tommy-mor avatar Sep 12 '24 14:09 tommy-mor

Would just need to extend all-transform protocol to strings.

nathanmarz avatar Sep 13 '24 03:09 nathanmarz

isn't this the issue, which was addressed by specter 1.1.5?

because it can be closed then, i guess.

onetom avatar Sep 26 '25 18:09 onetom