Your problem is that you are trying to call the '+ character, not the + function. When you call a character, it tries to find the character in the first argument (for example, if it were {'a 1 '+ 5 'b 2} , you would get 5 ). If you pass the second argument, this value is returned instead of nil if the character cannot be found in the first argument. So when you call ('+ 1 2) , it tries to search for '+ in 1 and fails, so it returns 2.
By the way, this is the difference between creating lists with '(+ 1 2) and (list + 1 2) . The former creates a list of +, 1, and 2. Since β1 and 1 is the same, that's fine. But theβ + βis not Var clojure.core / +, so the latter gets the value Var, while the first is just gets the character. So, if you did (list + 1 2) , you could work as it is written.
Chuck source share