You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test.clj
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,23 @@
26
26
(.append buf "x is: ")
27
27
(.append buf (str x))))
28
28
29
+
;; metadata doesn't break docstrings
30
+
(defnmax
31
+
"Returns the greatest of the nums."
32
+
{:added"1.0"
33
+
:inline-arities >1?
34
+
:inline (nary-inline 'max)}
35
+
([x] x)
36
+
([x y] (. clojure.lang.Numbers (max x y)))
37
+
([x y & more]
38
+
(reduce1 max (max x y) more)))
39
+
40
+
(defn ^String reverse
41
+
"Returns s with its characters reversed."
42
+
{:added"1.2"}
43
+
[^CharSequence s]
44
+
(.toString (.reverse (StringBuilder. s))))
45
+
29
46
;; useful for testing docstring filling
30
47
(defnsay-hello
31
48
"This is a long doc string to test clojure-fill-docstring. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed nunc luctus leo ultricies semper. Nullam id tempor mi. Cras adipiscing scelerisque purus, at semper magna tincidunt ut. Sed eget dolor vitae enim feugiat porttitor. Etiam vulputate pulvinar lacinia. Nam vitae nisl sit amet libero pulvinar pretium nec a dui. Ut luctus elit eu nulla posuere nec feugiat ipsum vehicula. Quisque eu pulvinar neque. Fusce fermentum adipiscing mauris, sit amet accumsan ante dignissim ac. Pellentesque molestie mollis condimentum.
0 commit comments