Skip to content

Add an arity to a function #410

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

Closed
benedekfazekas opened this issue Oct 14, 2016 · 2 comments
Closed

Add an arity to a function #410

benedekfazekas opened this issue Oct 14, 2016 · 2 comments

Comments

@benedekfazekas
Copy link
Member

By default I define functions as

(defn func [arg]
  body)

Adding an arity to such a function requires

  1. Wrapping the existing arglist and body in parens,
  2. Inserting a set of parens, and
  3. Defining a new arglist.

This is the most tedious refactoring I regularly do, and seems like a good candidate for a clj-refactor operation. I don't have any suggestions for how such an operation ought to work; any automated system ought to beat doing it manually.

Originally crated by @exupero on clj-refactor.el: clojure-emacs/clj-refactor.el#349

@benedekfazekas
Copy link
Member Author

@bbatsov perhaps creating enhancement and refactor labels may make sense for this and future issues?

@bbatsov
Copy link
Member

bbatsov commented Oct 14, 2016

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants