Skip to content

Instantly share code, notes, and snippets.

Python (3) to (Common) Lisp feature comparison
Memory model & typing:
CL & Python are both managed-memory languages.
Both are also dynamically-typed languages with strong type systems (no implicit type coercion), although Python's design leans toward "duck" typing, and CL's does not.
@commander-trashdin
commander-trashdin / infix-mode.lisp
Last active June 2, 2020 12:41 — forked from monroth/infix-mode.lisp
Infix mode for Common Lisp
(defparameter *infix-operator-order* '((!) (^ :reverse) (* /) (+ -) (> < >= <= =) (and) (or) (eql)))
(defparameter *infix-operator-set* '(+ * ^ - / ! = and or eql))
(defparameter *unary-operator-set* '(!))
(defparameter *infix-operator-hash* (let ((local-hash (make-hash-table)))
(setf (gethash '+ local-hash) '+)
(setf (gethash '* local-hash) '*)
(setf (gethash '^ local-hash) 'expt)