help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Navigating Lisp data structures


From: Joost Kremers
Subject: Re: Navigating Lisp data structures
Date: Mon, 05 Dec 2022 01:46:20 +0100
User-agent: mu4e 1.8.3; emacs 28.1.91

On Sun, Dec 04 2022, Matt wrote:

> I'm obviously looking at the problem through the lens of Python key-value
> structures. When I try to translate the data structure to something like
> nested plists, it feels messy. Maybe that's me simply being uncomfortable with
> nested lists? When I mix list types (e.g. an alist of plists), the lookup
> syntax becomes inconsistent (a mix of assocs and plist-gets, scattered with
> cars and cdrs

Note that there's also `alist-get`, which should at least help in reducing the
number of cars and cdrs.

You may also want to check out `let-alist`, which actually gives a nice way to
access the elements inside a nested alist.


-- 
Joost Kremers
Life has its moments



reply via email to

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