Skip to content

Commit edce7e0

Browse files
mfikesdnolen
authored andcommitted
CLJS-1637: Missing docstrings for a few vars
1 parent 396a62d commit edce7e0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,7 @@
981981
(-pr-writer [o writer _] (-write writer str)))
982982

983983
(defn symbol
984+
"Returns a Symbol with the given namespace and name."
984985
([name]
985986
(if (symbol? name)
986987
name
@@ -9158,6 +9159,7 @@ reduces them without incurring seq initialization"
91589159
(string-print (pr-str-with-opts objs opts)))
91599160

91609161
(defn newline
9162+
"Prints a newline using *print-fn*"
91619163
([] (newline nil))
91629164
([opts]
91639165
(string-print "\n")
@@ -10199,7 +10201,9 @@ reduces them without incurring seq initialization"
1019910201
(fn [x y]
1020010202
(cond (pred x y) -1 (pred y x) 1 :else 0)))
1020110203

10202-
(defn ^boolean special-symbol? [x]
10204+
(defn ^boolean special-symbol?
10205+
"Returns true if x names a special form"
10206+
[x]
1020310207
(contains?
1020410208
'#{if def fn* do let* loop* letfn* throw try catch finally
1020510209
recur new set! ns deftype* defrecord* . js* & quote var}

src/main/clojure/cljs/core.cljc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,10 @@
600600
(seq ret)))
601601
(core/list (asig fdecl))))))
602602

603-
(core/defmacro defonce [x init]
603+
(core/defmacro defonce
604+
"defs name to have the root value of init iff the named var has no root value,
605+
else init is unevaluated"
606+
[x init]
604607
`(when-not (exists? ~x)
605608
(def ~x ~init)))
606609

0 commit comments

Comments
 (0)