File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -334,22 +334,33 @@ a few examples:
334
334
----
335
335
336
336
This suggestion has certainly gotten some ground in the community, but it also
337
- goes against the entire Lisp tradition and the primary goal of this style guide -
337
+ goes against much of the Lisp tradition and one of the primary goals of this style guide -
338
338
namely to optimize code for human consumption.
339
339
340
- There's also one small caveat with fixed indentation that's rarely discussed and that's
341
- how to indent list literals, as function calls are simply list literals. As those
342
- are not very common in Clojure, outside the context of providing structure for the Clojure
343
- code itself, that matter is usually omitted from consideration:
340
+ There's one exception to the fixed indentation rule - data lists (those that are not a function invocation):
344
341
345
342
[source,clojure]
346
343
----
347
344
;;; Fixed Indentation
348
345
;;
349
346
;; list literals
347
+ ;; we still do
348
+ (1
349
+ 2
350
+ 3
351
+ 4
352
+ 5
353
+ 6)
354
+
355
+ ;; and
356
+ (1 2 3
357
+ 4 5 6)
358
+
359
+ ;; instead of
350
360
(1 2 3
351
361
4 5 6)
352
362
363
+ ;; or
353
364
(1
354
365
2
355
366
3
@@ -358,7 +369,7 @@ code itself, that matter is usually omitted from consideration:
358
369
6)
359
370
----
360
371
361
- That looks a bit weird and happens to be inconsistent with how other collection types are normally indented.
372
+ This makes sure that lists are consistent with how other collection types are normally indented.
362
373
363
374
****
364
375
You can’t perform that action at this time.
0 commit comments