Skip to content

Commit

Permalink
CLJS-1632: Typos, c/e, and consistency of docs/params
Browse files Browse the repository at this point in the history
  • Loading branch information
mfikes authored and swannodette committed Apr 25, 2016
1 parent 6ba8170 commit 8d33dd4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 23 deletions.
41 changes: 21 additions & 20 deletions src/main/cljs/cljs/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

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

(defn bit-and-not
"Bitwise and"
"Bitwise and with complement"
([x y] (cljs.core/bit-and-not x y))
([x y & more]
(reduce bit-and-not (cljs.core/bit-and-not x y) more)))
Expand Down Expand Up @@ -2662,12 +2662,12 @@ reduces them without incurring seq initialization"

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

(defn ^boolean zero?
"Returns true if num is zero, else false"
[n]
(cljs.core/zero? n))
[x]
(cljs.core/zero? x))

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

(defn cons
"Returns a new seq where x is the first element and seq is the rest."
"Returns a new seq where x is the first element and coll is the rest."
[x coll]
(if (or (nil? coll)
(implements? ISeq coll))
Expand Down Expand Up @@ -3065,7 +3065,7 @@ reduces them without incurring seq initialization"
false)))

(defn ^boolean symbol-identical?
"Efficient test to determine that two symbol are identical."
"Efficient test to determine that two symbols are identical."
[x y]
(if (identical? x y)
true
Expand Down Expand Up @@ -3118,7 +3118,7 @@ reduces them without incurring seq initialization"
(-lastIndexOf coll x start))

IPending
(-realized? [x]
(-realized? [coll]
(not fn))

IWithMeta
Expand Down Expand Up @@ -3496,10 +3496,10 @@ reduces them without incurring seq initialization"
(-persistent! tcoll))

(defn conj!
"Adds x to the transient collection, and return coll. The 'addition'
"Adds val to the transient collection, and return tcoll. The 'addition'
may happen at different 'places' depending on the concrete type."
([] (transient []))
([coll] coll)
([tcoll] tcoll)
([tcoll val]
(-conj! tcoll val))
([tcoll val & vals]
Expand Down Expand Up @@ -3532,7 +3532,7 @@ reduces them without incurring seq initialization"

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

Expand Down Expand Up @@ -4122,7 +4122,7 @@ reduces them without incurring seq initialization"

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

(defn replicate
"Returns a lazy seq of n xs."
"DEPRECATED: Use 'repeat' instead.
Returns a lazy seq of n xs."
[n x] (take n (repeat x)))

(defn repeatedly
Expand Down Expand Up @@ -4586,10 +4587,10 @@ reduces them without incurring seq initialization"

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

(defn clj->js
"Recursively transforms ClojureScript values to JavaScript.
sets/vectors/lists become Arrays, Keywords and Symbol become Strings,
Maps become Objects. Arbitrary keys are encoded to by key->js."
"Recursively transforms ClojureScript values to JavaScript.
sets/vectors/lists become Arrays, Keywords and Symbol become Strings,
Maps become Objects. Arbitrary keys are encoded to by key->js."
[x]
(when-not (nil? x)
(if (satisfies? IEncodeJS x)
Expand Down
4 changes: 2 additions & 2 deletions src/main/cljs/cljs/js.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
nil."
:dynamic true}
*load-fn*
(fn [name cb]
(fn [m cb]
(throw (js/Error. "No *load-fn* set"))))

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

(defn js-eval
Expand Down
2 changes: 1 addition & 1 deletion src/main/clojure/cljs/analyzer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@

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

(defmethod error-message :protocol-deprecated
[warning-type info]
Expand Down

0 comments on commit 8d33dd4

Please sign in to comment.