Fork me on GitHub
#clojurescript
<
2023-05-17
>
Aviv12:05:11

Hey everyone, can someone explain to me why this won’t work: (+ "a" "b") -> "cljs.core/+, all arguments must be numbers, got [string string] instead" but this is working: (+ @(atom "a") @(atom "b"))-> "ab" Thanks!

p-himik12:05:29

Because the message is from the compiler, and it cannot determine the types of the @(...) expressions.

🤯 2
p-himik12:05:33

+ is for numbers only.

Aviv12:05:25

oh I see thanks!

jpmonettas13:05:03

Hi everybody! What is the equivalent of Clojure (extend-protocol MyProto Object (proto-fn [x])) if I want a catch all for extend-protocol in ClojureScript?

jpmonettas13:05:40

Oh, I found default on the extend-type docs