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

Exception while using before-index #330

Open
Samy-33 opened this issue Mar 24, 2024 · 0 comments
Open

Exception while using before-index #330

Samy-33 opened this issue Mar 24, 2024 · 0 comments

Comments

@Samy-33
Copy link

Samy-33 commented Mar 24, 2024

Reproduction steps:

(require '[com.rpl.specter :as s])

(->> [1 [2 2] 5 34]
       (s/setval [(s/nthpath 1) (s/before-index 2)] [])
       (s/setval [(s/nthpath 1) (s/before-index 2)] []))

Throws: No protocol method InsertBeforeIndex.insert-before-idx defined for type cljs.core/Subvec: [2 2 []]

Looks like the first s/setval converts [2 2] into a subvec instead of keeping it as vector.

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

1 participant