comparison lisp/subr.el @ 783:6fadd0a2230b

[xemacs-hg @ 2002-03-19 02:38:51 by ben] memory usage fun
author ben
date Tue, 19 Mar 2002 02:38:51 +0000
parents e65d9cf16707
children e38acbeb1cae
comparison
equal deleted inserted replaced
782:616e133a0ce6 783:6fadd0a2230b
609 (while plist 609 (while plist
610 (setq alist (cons (cons (car plist) (cadr plist)) alist)) 610 (setq alist (cons (cons (car plist) (cadr plist)) alist))
611 (setq plist (cddr plist))) 611 (setq plist (cddr plist)))
612 (nreverse alist))) 612 (nreverse alist)))
613 613
614 (defun map-plist (_mp_fun _mp_plist)
615 "Map _MP_FUN (a function of two args) over each key/value pair in _MP_PLIST.
616 Return a list of the results."
617 (let (_mp_result)
618 (while _mp_plist
619 (push (funcall _mp_fun (car _mp_plist) (cadr _mp_plist)) _mp_result)
620 (setq _mp_plist (cddr _mp_plist)))
621 (nreverse _mp_result)))
622
614 (defun destructive-plist-to-alist (plist) 623 (defun destructive-plist-to-alist (plist)
615 "Convert property list PLIST into the equivalent association-list form. 624 "Convert property list PLIST into the equivalent association-list form.
616 The alist is returned. This converts from 625 The alist is returned. This converts from
617 626
618 \(a 1 b 2 c 3) 627 \(a 1 b 2 c 3)