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

paredit api should accept both map and vector for pos arguments #344

Open
lread opened this issue Feb 10, 2025 · 0 comments
Open

paredit api should accept both map and vector for pos arguments #344

lread opened this issue Feb 10, 2025 · 0 comments

Comments

@lread
Copy link
Collaborator

lread commented Feb 10, 2025

Problem/Opportunity
The paredit API has some fns that accept a pos argument.
It expects pos to be expressed as a map with :row and :col keys.
The paredit ns came from rewrite-cljs so the history/compatibility makes sense.

But rewrite-clj expresses position as a vector [row col] as a return from rewrite-clj.zip/position.
And allows for both the map and vector syntax for pos arg for rewrite-clj.zip/find-last-by-pos and rewrite-clj.zip/find-tag-by-pos.

Proposed Solution
In addition to map, also accept vector [row col] for pos for paredit pos args:

  • kill-at-pos
  • kill-one-at-pos
  • split-at-pos

Alternative Solutions
Nada

Additional context
None

Action
I will make it so

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