Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transforming a string with the ALL navigator yields a reversed sequence #320

Open
meditans opened this issue Jan 1, 2022 · 2 comments
Open

Comments

@meditans
Copy link

meditans commented Jan 1, 2022

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?

@tommy-mor
Copy link
Contributor

ran into this today

@nathanmarz
Copy link
Collaborator

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

tommy-mor added a commit to tommy-mor/specter that referenced this issue Sep 13, 2024
tommy-mor added a commit to tommy-mor/specter that referenced this issue Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants