I'm starting with Clojure and I have this problem: I need to enter two numbers on the keyboard and compare which is the largest or if they are the same. It gives me a casting error and neither does it read the function with the values I entered by keyboard. Take this from Python to Clojure:
Python
def max (n1, n2):
if n1 < n2:
print n2
elif n2 < n1:
print n1
else:
print "They are equals."
Clojure
(import '(java.util Scanner))
(def scan (Scanner. *in*))
(println "Numero 1: ")
(def num1 (.nextLine scan))
(println "Numero 2: ")
(def num2 (.nextLine scan))
(Integer/parseInt num1)
(Integer/parseInt num2)
(print "Tu numero1 = " num1 "y tu numero2 = " num2)
(defn max [num1 num2]
(if (< num1 num2)
(println "Mayor:" num2)
(println "Mayor:" num1)
))
I need Clojure to work just like in Python.