diff options
author | Andrew Kirkpatrick <ubermonk@gmail.com> | 2012-12-31 14:44:00 +1030 |
---|---|---|
committer | Andrew Kirkpatrick <ubermonk@gmail.com> | 2012-12-31 14:44:00 +1030 |
commit | ea74f5bfb6817b2b4e76a8ebb137ba57d27bdcad (patch) | |
tree | edafb3f5a1a7a3b1d22f4a3d909b0c083ff494a5 | |
parent | 83df0dd7a0c6ff9e982c1601b65b83647872bf29 (diff) |
removed recursion from kvplist->alist
-rw-r--r-- | kv.el | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -177,11 +177,9 @@ Converting to a symbol means dropping the :." The keys are expected to be :prefixed and the colons are removed. The keys in the resulting alist are symbols." - ;; RECURSION KLAXON (when plist - (destructuring-bind (key value &rest plist) plist - (cons `(,(keyword->symbol key) . ,value) - (kvplist->alist plist))))) + (loop for (key value . rest) on plist by 'cddr + collect (cons (keyword->symbol key) value)))) (defun kvalist2->plist (alist2) "Convert a list of alists too a list of plists." |