Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defn myfunc []
  2.     ((let [user-input(read-line)]
  3.     (int user-input)
  4.     (if (>= user-input 5)
  5.         (println "entered number is greater or equal to 5")
  6.         (println "entered number is less than 5")))))
  7.  
  8. ;error message: ClassCastException java.lang.String cannot be cast to java.lang.Character  clojure.lang.RT.intCast (RT.java:1087)
  9.  
  10. ;how do I fix this and how would I make this to be a more functional style? Thank you.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement