emacs-devel
[Top][All Lists]
Advanced

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

Re: How to remove verbosity from the data passing mechanism using alist


From: Fren Zeee
Subject: Re: How to remove verbosity from the data passing mechanism using alist or plist ?
Date: Tue, 7 Dec 2010 15:19:14 -0800

Let me sharpen my question on the conceptual issue. Note, the original
question has split into several ways and we are just on this one for
now in this reply of mine.

What's the meaning of (cons 1 2) versus (list 1 2) ?

cons expects the second argument to be a list and inserts the first into it.

Thus (cons 1 2) did not make sense to me. Perhaps, after a few years I
have forgotten or dulled in my concepts.

(list 1 2) <=> (cons 1 (cons 2 () ))

Anyway, I can move forward with this unless you or anyone has
something enlightening to add and someone does come and start telling
me I need to go and take a class in lisp.

We can move to the

 -----------------> less piecewise-constructive and more
table-oriented. <-------------------

Franz Xe

>
> Yes it helped, but I cant honestly see the difference between
> (a . b)  <--- from cons
> and
> (a b)    <--- from list
>
> both seem to be dotted pair although the dot is implicit in the second.
>
> We are getting to the heart of the thing, ie concept, although the
> problem is solved in that I have the answer
>
>
> (assoc-default 1 (list (list 1 2) (list 3 4) (list 5 6)))
> ------>  (2)  so I need xtra car verbose
> (assoc-default 1 (list (cons 1 2) (cons 3 4) (cons 5 6)))    ------>
> 2    so I dont need xtra car
>



reply via email to

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