I'ts because key-code body is not quoted, so it's executed at macro expansion time and the argument is unevaluated '(:up controls) instead of the actual value I'd like to have there. Then it breaks on key->upper function because it cannot convert the list '(:up controls) to a name.
The
key-code
function is defined as a macro here: https://github.com/oakes/play-clj/blob/894040fae0ced31568f464753bb780dee49f679f/src/play_clj/core_basics.clj#L110This causes this code to fail:
I'ts because
key-code
body is not quoted, so it's executed at macro expansion time and the argument is unevaluated'(:up controls)
instead of the actual value I'd like to have there. Then it breaks onkey->upper
function because it cannot convert the list'(:up controls)
to a name.Fix could be simple: