[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to draw cons cell diagrams?

From: Emanuel Berg
Subject: Re: How to draw cons cell diagrams?
Date: Fri, 30 Mar 2018 22:27:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Marcin Borkowski wrote:

> I'd like to draw ASCII-art diagrams of lists
> and cons cells, like the ones found here:
> (info "(elisp) Building Lists") or here (info
> "(eintr) Lists diagrammed") or something
> like this.

Interesting idea, and I think you could do it
quite well if you just succeed in hooking one
(a single) car into a cdr, because if you do
that, after that everything would follow with
"expanding recursion". This is how a simple
data structure, for example a tree, is turned
into a diagram, and what is a tree if not just
a nested list?

Perhaps this is an Org-mode thing BTW?

The only reservation is, isn't that kind of
expert manipulation of lists, even among
Lispers, a thing of the past?

In all my Elisp I have only 8 "cons". But then
again everyone isn't me, so maybe I'm wrong
here - in all my Elisp, I'd say that has
happened about 8 times as well :)

But to get this post back on the constructive
path, the way I would approach this idea is
like many other ideas that amount to automate
stuff, which Emacs, Elisp and in essence all
programming/computing is all about, the way I'd
take the first step is by doing it manually!

So, if you don't mind, provide us with a list
in code, and then the corresponding "ASCII art"
(yuk, that word), and even tho this kind of
task is more suited for clear-headed kids and
very young men, I think we could pull it off,
God willing :)

underground experts united

reply via email to

[Prev in Thread] Current Thread [Next in Thread]