Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Dotted list in lisp

I’m trying to recreate this structure with lisp (key . (list of values))

Ex: (a . (b c))

I managed to recreate the opposite ((a b) . c), but is not what i need.
Is possible?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

(cons 'a (list 'b 'c))

Note that when you print this it will be printed as

(A B C)

because a cons whose cdr is a list is printed using list notation, not dotted notation.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading