Permalink
Browse files

removed recursion from kvplist->alist

  • Loading branch information...
1 parent 83df0dd commit ea74f5bfb6817b2b4e76a8ebb137ba57d27bdcad @spacebat spacebat committed Dec 31, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 kv.el
View
6 kv.el
@@ -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."

0 comments on commit ea74f5b

Please sign in to comment.