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

clarify if/why macros and functions are indented differently? #87

Closed
mattfenwick opened this issue Aug 10, 2014 · 2 comments
Closed

clarify if/why macros and functions are indented differently? #87

mattfenwick opened this issue Aug 10, 2014 · 2 comments

Comments

@mattfenwick
Copy link

I noticed a discrepancy between the first two examples (here and here)

;; good
(when something
  (something-else))

;; good
(filter even?
        (range 1 10))

Is that intentional? If so, what is the rationale? My guess is becuase when is a macro and filter is a function.

@bbatsov
Copy link
Owner

bbatsov commented Aug 11, 2014

Macros that have a body form (like when, defn, etc) are historically indented differently. All filter arguments are considered equal, so it's common to align them. I guess we should extend this information in the guide.

@bbatsov
Copy link
Owner

bbatsov commented Dec 18, 2014

See #89 for more details.

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

2 participants