obviously, this code should fail :
(define or 5)
but I was wondering why does this code fail to run :
(define apply
(lambda (x y f)
(f x y)
)
)
(apply #f #t or)
(or #f #t), would work as expected.
I'm not defining any new variable with a saved name, only passing the function or as an argument.
and (apply 1 2 +) on the other hand works...
(define or 5)fails. It does not make much sense, but it is legit Scheme code.apply, that clashes with a built-in procedure of the same name.(define define 5)is perfectly OK and in the same lexical scope you may notdefineanymore for anything other then getting the binding5.