Skip to content

Commit 8d33dd4

Browse files
mfikesswannodette
authored andcommitted
CLJS-1632: Typos, c/e, and consistency of docs/params
1 parent 6ba8170 commit 8d33dd4

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

Diff for: src/main/cljs/cljs/core.cljs

+21-20
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
(defonce
5252
^{:doc "Each runtime environment provides a different way to print error output.
53-
Whatever function *print-fn* is bound to will be passed any
53+
Whatever function *print-err-fn* is bound to will be passed any
5454
Strings which should be printed." :dynamic true}
5555
*print-err-fn*
5656
(fn [_]
@@ -2595,7 +2595,7 @@ reduces them without incurring seq initialization"
25952595
(reduce bit-or (cljs.core/bit-or x y) more)))
25962596

25972597
(defn bit-and-not
2598-
"Bitwise and"
2598+
"Bitwise and with complement"
25992599
([x y] (cljs.core/bit-and-not x y))
26002600
([x y & more]
26012601
(reduce bit-and-not (cljs.core/bit-and-not x y) more)))
@@ -2662,12 +2662,12 @@ reduces them without incurring seq initialization"
26622662

26632663
(defn ^boolean pos?
26642664
"Returns true if num is greater than zero, else false"
2665-
[n] (cljs.core/pos? n))
2665+
[x] (cljs.core/pos? x))
26662666

26672667
(defn ^boolean zero?
26682668
"Returns true if num is zero, else false"
2669-
[n]
2670-
(cljs.core/zero? n))
2669+
[x]
2670+
(cljs.core/zero? x))
26712671

26722672
(defn ^boolean neg?
26732673
"Returns true if num is less than zero, else false"
@@ -3000,7 +3000,7 @@ reduces them without incurring seq initialization"
30003000
(es6-iterable Cons)
30013001

30023002
(defn cons
3003-
"Returns a new seq where x is the first element and seq is the rest."
3003+
"Returns a new seq where x is the first element and coll is the rest."
30043004
[x coll]
30053005
(if (or (nil? coll)
30063006
(implements? ISeq coll))
@@ -3065,7 +3065,7 @@ reduces them without incurring seq initialization"
30653065
false)))
30663066

30673067
(defn ^boolean symbol-identical?
3068-
"Efficient test to determine that two symbol are identical."
3068+
"Efficient test to determine that two symbols are identical."
30693069
[x y]
30703070
(if (identical? x y)
30713071
true
@@ -3118,7 +3118,7 @@ reduces them without incurring seq initialization"
31183118
(-lastIndexOf coll x start))
31193119

31203120
IPending
3121-
(-realized? [x]
3121+
(-realized? [coll]
31223122
(not fn))
31233123

31243124
IWithMeta
@@ -3496,10 +3496,10 @@ reduces them without incurring seq initialization"
34963496
(-persistent! tcoll))
34973497

34983498
(defn conj!
3499-
"Adds x to the transient collection, and return coll. The 'addition'
3499+
"Adds val to the transient collection, and return tcoll. The 'addition'
35003500
may happen at different 'places' depending on the concrete type."
35013501
([] (transient []))
3502-
([coll] coll)
3502+
([tcoll] tcoll)
35033503
([tcoll val]
35043504
(-conj! tcoll val))
35053505
([tcoll val & vals]
@@ -3532,7 +3532,7 @@ reduces them without incurring seq initialization"
35323532

35333533
(defn pop!
35343534
"Removes the last item from a transient vector. If
3535-
the collection is empty, throws an exception. Returns coll"
3535+
the collection is empty, throws an exception. Returns tcoll"
35363536
[tcoll]
35373537
(-pop! tcoll))
35383538

@@ -4122,7 +4122,7 @@ reduces them without incurring seq initialization"
41224122

41234123
(defn reset!
41244124
"Sets the value of atom to newval without regard for the
4125-
current value. Returns newval."
4125+
current value. Returns new-value."
41264126
[a new-value]
41274127
(if (instance? Atom a)
41284128
(let [validate (.-validator a)]
@@ -4472,7 +4472,8 @@ reduces them without incurring seq initialization"
44724472
([n x] (take n (repeat x))))
44734473

44744474
(defn replicate
4475-
"Returns a lazy seq of n xs."
4475+
"DEPRECATED: Use 'repeat' instead.
4476+
Returns a lazy seq of n xs."
44764477
[n x] (take n (repeat x)))
44774478

44784479
(defn repeatedly
@@ -4586,10 +4587,10 @@ reduces them without incurring seq initialization"
45864587

45874588
(defn tree-seq
45884589
"Returns a lazy sequence of the nodes in a tree, via a depth-first walk.
4589-
branch? must be a fn of one arg that returns true if passed a node
4590-
that can have children (but may not). children must be a fn of one
4591-
arg that returns a sequence of the children. Will only be called on
4592-
nodes for which branch? returns true. Root is the root node of the
4590+
branch? must be a fn of one arg that returns true if passed a node
4591+
that can have children (but may not). children must be a fn of one
4592+
arg that returns a sequence of the children. Will only be called on
4593+
nodes for which branch? returns true. Root is the root node of the
45934594
tree."
45944595
[branch? children root]
45954596
(let [walk (fn walk [node]
@@ -9559,9 +9560,9 @@ reduces them without incurring seq initialization"
95599560
(pr-str k))))
95609561

95619562
(defn clj->js
9562-
"Recursively transforms ClojureScript values to JavaScript.
9563-
sets/vectors/lists become Arrays, Keywords and Symbol become Strings,
9564-
Maps become Objects. Arbitrary keys are encoded to by key->js."
9563+
"Recursively transforms ClojureScript values to JavaScript.
9564+
sets/vectors/lists become Arrays, Keywords and Symbol become Strings,
9565+
Maps become Objects. Arbitrary keys are encoded to by key->js."
95659566
[x]
95669567
(when-not (nil? x)
95679568
(if (satisfies? IEncodeJS x)

Diff for: src/main/cljs/cljs/js.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
nil."
8080
:dynamic true}
8181
*load-fn*
82-
(fn [name cb]
82+
(fn [m cb]
8383
(throw (js/Error. "No *load-fn* set"))))
8484

8585
(defonce
@@ -95,7 +95,7 @@
9595
The result of evaluation should be the return value."
9696
:dynamic true}
9797
*eval-fn*
98-
(fn [js-source]
98+
(fn [m]
9999
(throw (js/Error. "No *eval-fn* set"))))
100100

101101
(defn js-eval

Diff for: src/main/clojure/cljs/analyzer.cljc

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269

270270
(defmethod error-message :undeclared-ns-form
271271
[warning-type info]
272-
(str "Invalid :refer, var " (:type info) " " (:lib info) "/" (:sym info) " does not exist"))
272+
(str "Invalid :refer, " (:type info) " " (:lib info) "/" (:sym info) " does not exist"))
273273

274274
(defmethod error-message :protocol-deprecated
275275
[warning-type info]

0 commit comments

Comments
 (0)