CL also has pretty much arbitrarily extensible syntax:
- https://sr.ht/~dieggsy/whisper/
- https://dieggsy.com/json-literals.html
And could also be used to build languages, supporting more modern programming paradigms (though yes, I believe Racket does make this easier):
- https://coalton-lang.github.io/
I also might have written the Common Lisp example using reduce as well, which is in the standard library, but that's preference. Nice to have the option though:
(defun calculate (instructions)
(reduce
(lambda (result op-value)
(destructuring-bind (operation value) op-value
(case operation
(:add (+ result value))
(:subtract (- result value))
(:multiply (* result value)))))
instructions
:initial-value 0))
(calculate '((:add 5) (:multiply 3) (:subtract 4))) ;; => 11
I'd have used
instead, looks funkier =)Oh yeah, way more fun :) I just kinda saw CL in the Clojure and was trying to make it look like that.