---
layout: ../Site.layout.js
---
# Common lisp cl-series macro package recursively intern list fringe as symbols

Well, I wanted to use it a minute ago for whatever reason. Macro characters will still have their macro character meanings when they are read using `read` (the default for series scanners). In this case all that happens is that the numbers get interned as a symbol whose symbol-name is a string of the number.

Cl-series:
- https://gitlab.common-lisp.net/rtoy/cl-series/-/wikis/Series-User's-Guide
- ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-1082.pdf

Here done interactively in the repl.

```
(defparameter *list* '((a 1 b 2) (3) 4 (((c)))))
*list*
(require :series)
(series::install)
(scan-lists-of-lists-fringe ***)
(#Mformat (series nil) (series "~a") *)
(#Mintern *)
(alter *** *)
(series::install :remove t)
*list*
```

Output:

```
CL-USER> (defparameter *list* '((a 1 b 2) (3) 4 (((c)))))
*LIST*
CL-USER> *list*
((A 1 B 2) (3) 4 (((C))))
CL-USER> (require :series)
NIL
CL-USER> (series::install)
T
CL-USER> (scan-lists-of-lists-fringe ***)
#Z(A 1 B 2 3 4 C)
CL-USER> (#Mformat (series nil) (series "~a") *)
#Z("A" "1" "B" "2" "3" "4" "C")
CL-USER> (#Mintern *)
#Z(A |1| B |2| |3| |4| C)
CL-USER> (alter *** *)
;;; Warning: Restriction violation 5 in series expression:
(ALTER *** *)
Alter applied to a series that is not known at compile time:
(ALTER *** *)
NIL
CL-USER> (series::install :remove t)
T
CL-USER> *list*
((A |1| B |2|) (|3|) |4| (((C))))
CL-USER> 
```

# Conclusions

Series has special measures for still virtually working done incrementally, even though the way it intends to work is that it constructs a graph and writes tight lazy efficient code at (one) macroexpansion. `scan-lists-of-lists-fringe`.. `alter` is powerful. `alter` changes values in the original sequence that was scanned in-place. The fringe is the fringe.

# Fin.

See you [on the Mastodon](https://gamerplus.org/@screwlisp/115772942036816605).

In the annual lisp tradition, today's show https://communitymedia.video/w/xnUY9Z6koSooVQUHradmwj with [Kent Pitman](https://en.wikipedia.org/wiki/Kent_Pitman) and [Ramin Honary](https://codeberg.org/ramin_hal9001/) has me reading Kent's [A Christmas Peril](https://www.nhplace.com/kent/Writing/A-Christmas-Peril.html) after 10 minutes of me having pushed the wrong button to start the stream (again, even after Sunday's debacle https://toobnix.org/w/dxv8UHoNciHkfRYWXupWu8).