This is true - I once wrote something like that in a common lisp but never got it past the half-assed but useful.
Similarly (but painfully and never completely successful), see all the c++ expression template approaches to linear algebra. After 15 years or so some of them are quite usable but retain some of the pain.