In your code, x
is always a Long
When you run (x / y)
, it tries to invoke x
as a function, but you can't cast a Long to a function.
What you are trying to do is (/ x y)
About sum
, as you didn't share the implementation, I can only guess: probably (sum vec_foo)
works.