Am I using atom? wrong or there is something else....?

Viewed 2328

Basically...

=> (atom? 5)

CompilerException java.lang.RuntimeException: Unable to resolve symbol: atom? in this context, compiling:(NO_SOURCE_PATH:1)

=> (atom? /a)

RuntimeException Invalid token: /a clojure.lang.Util.runtimeException (Util.java:156) RuntimeException Unmatched delimiter: ) clojure.lang.Util.runtimeException (Util.java:156)

=> (atom? "hello world")

CompilerException java.lang.RuntimeException: Unable to resolve symbol: atom? in this context, compiling:(NO_SOURCE_PATH:1)

So does anyone know what's happening?? I am using Eclipse Juno 4.2, the CounterClockwise plugin.

5 Answers

You can create atom? function like this:

   (defn atom? [x]
          (not (coll? x))
    )
Related