Hi Joe,
> Hi Alex, I revisited my code based on your reply. I like the con/cons
> approach and developed a small helper class. I'm sharing here in case
> others find it helpful:
Nice!
> (class +AppendList)
>
> (dm T () (=: L (cons)))
>
> (dm append> (Node Parent)
> (let L (or Parent (: L))
Hi Joe,
> (setq L NIL)
> (list-make 'L)
> (list-make 'L)
> (list-link 'L 'parent)
> (list-make 'L)
> (list-link 'L 'child)
> (list-link 'L 'child)
> (list-close-all 'L)
>
> -> ((parent (child child)))
>
> I don't know how I feel about it...
I'm not sure if I grasp the spirit of your intention,
Here's a naive implementation:
(de list-make ("Lst")
(queue "Lst" "("))
(de list-link ("Lst" Node)
(queue "Lst" Node)
(queue "Lst" " "))
(de list-close ("Lst")
(queue "Lst" ")"))
(de list-close-all ("Lst")
(let (Open (length (sect (val "Lst") (list "(" )))
Close (length (sect