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

+1 vote
in Clojure by

Why does the following expression throws a ClassCastException:

(:dummy (apply sorted-set [1 2 3]))

=> Clojure: class java.lang.ClassCastException
class java.lang.Long cannot be cast to class clojure.lang.Keyword (java.lang.Long is in module java.base of loader 'bootstrap'; clojure.lang.Keyword is in unnamed module of loader 'app')

Whereas this works as expected:

(:dummy (apply hash-set [1 2 3])) => nil

1 Answer

0 votes
...