Lisp Highlight Demo
;; Shape Calculator ;; A demo showcasing lisp-highlight features (defconstant +pi+ 3.14159) (defparameter *shapes* '(circle rectangle triangle)) ;; Area calculations (defun circle-area (r) (* +pi+ r r)) (defun rectangle-area (w h) (* w h)) (defun describe-shape (shape) (cond ((eq shape 'circle) "A round shape") ((eq shape 'rectangle) "A flat shape") (t "Unknown shape"))) ;; Compute areas for a list of radii (including a ratio) (let ((radii '(1 2 3 1/2))) (mapcar #'circle-area radii)) ;; Hex color code and binary flag (defvar *color* #xFF5733) (defvar *active* #b1) ;; Character and nil defaults (defvar *separator* #\newline) (defvar *result* nil)
▶ Run Highlight