Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 409 Bytes

java-lang-string-cannot-be-cast-to-clojure-lang-ifn.md

File metadata and controls

31 lines (20 loc) · 409 Bytes

Working with lists

Missing quote

Error Message

ClassCastException java.lang.String cannot be cast to clojure.lang.IFn

Cause

The above error can occur when we try to create a list literal without the quote:

("a" "b" "c")

Solutions

Either add the initial single quote:

'("a" "b" "c")

or use the list function:

(list "a" "b" "c")