Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

In {{cljs.core/pr-sequential-writer}}, there is a {{loop}} that initializes {{n}} to be the result of {{dec}}, and upon {{recur}}, {{dec}} is also caused to form the next value of {{n}}.

In the scope of that {{loop}} there is an expression

(or (nil? n) (not (zero? n)))

which can be simplified to

(not (zero? n))

because {{n}} is known to be a number, and cannot be {{nil}}.

6 Answers

0 votes
by

Comment made by: kucerm2

Nil check removed.

0 votes
by

Comment made by: mfikes

CLJS-3081-0.patch passes CI (/)

0 votes
by

Comment made by: mfikes

CLJS-3081-0.patch passes Canary (/)

0 votes
by

Comment made by: mfikes

CLJS-3081-0.patch added to Patch Tender (i)

0 votes
by

Comment made by: mfikes

CLJS-3081-0.patch LGTM

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-3081 (reported by mfikes)
...