[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to iterate over properties in a plist?
From: |
Marcin Borkowski |
Subject: |
How to iterate over properties in a plist? |
Date: |
Fri, 31 Jul 2015 23:42:37 +0200 |
Hi all,
I need to iterate over all properties in a plist. Obviously, mapcar (or
mapc, since I need side effects only) is of no use for me. I can easily
write a plist-mapc function:
--8<---------------cut here---------------start------------->8---
(defun plist-mapc (function plist)
"Iterate FUNCTION (a two-argument function) over PLIST. Error
checking is for weenies."
(when plist
(funcall function (car plist) (cadr plist))
(plist-mapc function (cddr plist))))
--8<---------------cut here---------------end--------------->8---
but maybe it's there already?
TIA,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
- How to iterate over properties in a plist?,
Marcin Borkowski <=