(defn my-fun [x]
(println -x))
Executing this code, i get:
Unable to resolve symbol: -x in this context
Why can't i just invert x?
Dashes are valid symbols in names.
To do a unary negation, you'd treat it like you would any other function:
(println (- x))
From the docs:
If no ys are supplied, returns the negation of x . . .