Algebraic data types: Difference between revisions

describe pattern matching in CL
(added CL code (please PM me if it has bugs))
(describe pattern matching in CL)
Line 7:
=={{header|Common Lisp}}==
 
Common Lisp doesn't come with any pattern-matching solutions on its own, but with the help of its macro facility, it can incorporate features from other languages such as pattern matching. Macros expand into efficient code during compilation time and there isn't much difference if it's included in the core language or not. As has been said, Lisp is a ball of mud and remains one no matter what one throws at it.
A straighforward translation of the TCL solution. I don't know red-black-trees myself but I tried mirroring the original solution as closely as possible. It uses a pattern-matching library called [http://www.takeda.tk/~sthalik/stuff/toadstool-current.tar toadstool].
 
AThis is a straighforward translation of the TCL solution. I don't know red-black-trees myself but I tried mirroring the original solutionprogram as closely as possible. It uses a pattern-matching library called [http://www.takeda.tk/~sthalik/stuff/toadstool-current.tar toadstool].
 
<lang lisp>(mapc #'use-package '(#:toadstool #:toadstool-system))