[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lisp anime video
From: |
Arthur Miller |
Subject: |
Re: Lisp anime video |
Date: |
Mon, 06 Sep 2021 07:08:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> Arthur Miller wrote:
>
>> Indeed lists can be fun. I think it is fun that there is no
>> explicit data structure called list in traditional lisps, it
>> just a way to work with conses.
>
> Hm ... interesting ...
>
> There is no explicit _list data type_ in Elisp,
>
> (defvar num-list nil) ; nil
> (setq num-list '(1 2 3)) ; (1 2 3)
> (listp num-list) ; t
> (type-of num-list) ; cons
>
> But there is an explicit _list function_, i.e., `list', that
> returns a list, made up out of (car cdr) (or cons cells)
> but nonetheless ...
>
> Does that mean there is an explicit list data structure
> in Elisp? Or is it implicit?
Cons is an explicit data structure, so is vector, hash table etc.
Linked list is a bunch of nodes (conses) that form a list by data stored in
them. But yes it is a diffuse line. I guess only truly explicit data in a CPU is
a register.
> Or is it just implicit in '(1 2 3)?
>
>> By the way, I found a nice little program to show cons
>> structures (lists) and converted it to elisp. It is cool,
>> looks like box drawings in early papers.
>
> Can it do the other thing around?
It is left for you as an exercise to make it ;)
- RE: [External] : Re: Lisp anime video, (continued)
- Re: Lisp anime video, tomas, 2021/09/05
- Re: Lisp anime video, Emanuel Berg, 2021/09/05
- Re: Lisp anime video, tomas, 2021/09/05
- Re: Lisp anime video, Emanuel Berg, 2021/09/05
- Re: Lisp anime video, Arthur Miller, 2021/09/05
- Re: Lisp anime video, Emanuel Berg, 2021/09/05
- Re: Lisp anime video,
Arthur Miller <=
- FW: [External] : Re: Lisp anime video, Drew Adams, 2021/09/04
- Re: FW: [External] : Re: Lisp anime video, Stefan Monnier, 2021/09/04
- Re: FW: [External] : Re: Lisp anime video, Emanuel Berg, 2021/09/04
- FW: FW: [External] : Re: Lisp anime video, Drew Adams, 2021/09/04
- Re: FW: [External] : Re: Lisp anime video, Emanuel Berg, 2021/09/24
- Re: FW: [External] : Re: Lisp anime video, tomas, 2021/09/24
- Re: FW: [External] : Re: Lisp anime video, Emanuel Berg, 2021/09/24
- RE: FW: [External] : Re: Lisp anime video, Drew Adams, 2021/09/24
- Re: FW: [External] : Re: Lisp anime video, Emanuel Berg, 2021/09/24
- RE: FW: [External] : Re: Lisp anime video, Drew Adams, 2021/09/24