Skip to content

Commit 4b374be

Browse files
author
Marshall Bockrath-Vandegrift
committed
Threading macros do not have bodies.
The core threading macros `->` and `->>` do not have a clear head/body distinction, and are not treated or formatted as such in the majority of extant Clojure code, including the in the implementation of Clojure itself. Actual usage of `as->` and `cond->` is less common and more varied, but seems to support their inclusion in this category.
1 parent 682cbb4 commit 4b374be

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ You can generate a PDF or an HTML copy of this guide using
6262
Use 2 spaces to indent the bodies of
6363
forms that have body parameters. This covers all `def` forms, special
6464
forms and macros that introduce local bindings (e.g. `loop`, `let`,
65-
`when-let`) and many macros like `when`, `cond`, `->`, `->>`, `as->`, `case`,
65+
`when-let`) and many macros like `when`, `cond`, `as->`, `cond->`, `case`,
6666
`with-*`, etc.
6767
<sup>[[link](#body-indentation)]</sup>
6868

@@ -723,18 +723,18 @@ pairwise constructs as found in e.g. `let` and `cond`.
723723
```Clojure
724724
;; good
725725
(-> [1 2 3]
726-
reverse
727-
(conj 4)
728-
prn)
726+
reverse
727+
(conj 4)
728+
prn)
729729

730730
;; not as good
731731
(prn (conj (reverse [1 2 3])
732732
4))
733733

734734
;; good
735735
(->> (range 1 10)
736-
(filter even?)
737-
(map (partial * 2)))
736+
(filter even?)
737+
(map (partial * 2)))
738738

739739
;; not as good
740740
(map (partial * 2)

0 commit comments

Comments
 (0)