cl- , . ugly-tiny-infix-macro.
:
($ a * ($ 8 * (expt b 2) + 1) + 4 * b * c * ($ 4 * (expt b 2) + 1))
(+ (* A (+ (* 8 (EXPT B 2)) 1)) (* (* (* 4 B) C) (+ (* 4 (EXPT B 2)) 1)))
:
$ - . , , / , .
, :
($ 1 + 2) ; gets converted to (+ 1 2), where name of the macro is $
($ t and nil) ; gets converted to (and t nil)
($ 3 > 5) ; gets converted to (> 3 5)
($ 1 + 2 + 3) ; gets converted to (+ (+ 1 2) 3)
($ 1 + 2 * 3) ; gets converted to (+ 1 (* 2 3))
($ 1 < 2 and 2 < 3) ; gets converted to (AND (< 1 2) (< 2 3))
, , lisp.
($ 2 + (max 9 10 11)) ; gets converted to (+ 2 (max 9 10 11)). It could have been any function / lisp form.
($ 6 / ($ 1 + 2)) ; gets converted to (/ 6 ($ 1 + 2)), and then subsequently to (/6 (+ 1 2))
Itβs easier for me to reason and more profitable than the readerβs macro, because it can be easily mixed with lisp forms , so you can embed lisp expressions in the form. For example, it (exp b 2)can be any form of lisp, for example, (max a b c)or your own user (foobar a b c).
Further information on README can be found on github. It is also available in quicklisp.
source
share