The ->, ->>, and --> threading macros have short names, and they align
all arguments vertically, including the first one.
While the -some->, -some->>, and -some--> macros have similar
behaviour, they actually have quite long names, resulting in code that
looks like this:
(-some->> '(1 2 3)
(do-something)
(and-something-else))
Adding a (declare (indent 1)) declaration for those variants
results in this indentation instead:
(-some->> '(1 2 3)
(do-something)
(and-something-else))
This is arguably better since the ‘some’ version of these threading
macros actually treat their first argument a bit special: if the
expression evalutes to nil, the rest won't even run, and this
indentation makes the whole expression look more like a conditional
form.
Fixes #319.
master
parent
9631947f2f
commit
070b569f61
1 changed files with 6 additions and 3 deletions
Loading…
Reference in new issue