is
a library for writing infix mathematical notation in Common Lisp.
To install it:
1. In the Bash
terminal, get Quicklisp
by the following command:
sudo apt-get install cl-quicklisp
The file quicklisp.lisp
will be created at
/usr/share/common-lisp/source/quicklisp/quicklisp.lisp
.
2. Run the command
sbcl --load /usr/share/common-lisp/source/quicklisp/quicklisp.lisp
3. Follow the install instructions:
(quicklisp-quickstart:install) (ql:add-to-init-file)
.
4. To enable the library, in the Common Lisp REPL, run the code:
(ql:quickload :cmu-infix)
5. And then run:
(named-readtables:in-readtable cmu-infix:syntax)
.
6. To test the library, run:
(defmacro add (x y) `(let ((a ,x) (b ,y)) #I(a+b))) (add 2 3) (macroexpand-1 '(add 2 3)) (macroexpand-1 '#I(1+2-3*5^^6)) (eval (macroexpand-1 '#I(1+2-3*5^^6)))
— Me@2022-12-25 10:13:04 AM
.
.
2022.12.25 Sunday (c) All rights reserved by ACHK
You must be logged in to post a comment.