Created
January 18, 2018 07:55
-
-
Save dustinlacewell-wk/5c3ed20dcbec3df3537feaa713d8a2c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun print-plist (a) | |
(loop for (key value) on a by 'cddr | |
do (message "key: %s - value: %s" key value))) | |
(defun merge-plist (first second) | |
(loop for (key value) on second by 'cddr | |
do (setq first (plist-put first key value)))) | |
(setq a (list :foo 1 :bar 2)) | |
(setq b (list :foo 2)) | |
(message "Before:") | |
(print-plist a) | |
(merge-plist 'a b) | |
(message "After:") | |
(print-plist a) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment