In Scheme (function-name arguments)
is the syntax for applying a function to the given arguments. So (x)
means "apply the function x
to no arguments". However x
is not a function, which the compiler is trying to tell you by saying that it's not "applicable".
Since you don't actually want to apply x
, simply remove the parentheses around it. Same for (y)
in the other case of the cond
.