Our M‑x xx
command is just about complete. As a final touch,
we’ll expand it to read the colours within a pattern as input.
It currently uses a fixed list of colours —
(black magenta pink)
.
This list was easy to work with, but won’t apply to any other
patterns but bakery.xx
.
As a final touch, we’ll expand M‑x xx
to read in the colours
as input. To do this, we’ll need to build and explore dynamic lists.
This is the last stretch of our journey of Elisp. If you’ve been
able to follow the challenges of quote
and
lambda
you’ll find it a comfortable stroll.
Off we go!
Learning objectives
Access pair and list elements with
car
andcdr
Build lists dynamically with
cons
Define pairs and lists
Construct static pairs using the dot syntax