Skip to content

Instantly share code, notes, and snippets.

@mfikes
Created January 8, 2019 23:57
Show Gist options
  • Save mfikes/9e9521b932b5376442b4fe31a25b8969 to your computer and use it in GitHub Desktop.
Save mfikes/9e9521b932b5376442b4fe31a25b8969 to your computer and use it in GitHub Desktop.

Old behavior:

cljs.user=> (defn f [x] (when (even? x) (inc x)))
#'cljs.user/f
cljs.user=> (let [x (f 2)] (if x (+ x "a")))
                                 ^
WARNING: cljs.core/+, all arguments must be numbers, got [#{number clj-nil} string] instead at line 1
"3a"

Note the mention of #{number clj-nil}

New behavior:

cljs.user=> (defn f [x] (when (even? x) (inc x)))
#'cljs.user/f
cljs.user=> (let [x (f 2)] (if x (+ x "a")))
WARNING: cljs.core/+, all arguments must be numbers, got [number string] instead at line 1 <cljs repl>
"3a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment