summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNic Ferier <nic@ferrier.me.uk>2013-02-17 16:38:08 +0000
committerNic Ferier <nic@ferrier.me.uk>2013-02-17 16:38:08 +0000
commit688ba7a0e82068598c3f5773c58515a6bb01380f (patch)
treedc76d8bf59d81a9b4193e96c0c3b19e7bf586007
parent6c8774fa3c3821b91865b94e9ab38f0f5e796396 (diff)
add new kv mapping functions kvcar and kvcdr. bump version.
-rw-r--r--kv.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/kv.el b/kv.el
index d442a2d..67be80f 100644
--- a/kv.el
+++ b/kv.el
@@ -4,7 +4,7 @@
;; Author: Nic Ferrier <nferrier@ferrier.me.uk>
;; Keywords: lisp
-;; Version: 0.0.12
+;; Version: 0.0.14
;; Maintainer: Nic Ferrier <nferrier@ferrier.me.uk>
;; Created: 7th September 2012
@@ -283,8 +283,17 @@ cons cells."
collect rec)))
(defun kvidentity (a b)
+ "Returns a cons of A B."
(cons a b))
+(defun kvcar (a b)
+ "Given A B returns A."
+ a)
+
+(defun kvcdr (a b)
+ "Given A B returns B."
+ b)
+
(defun kvcmp (a b)
"Do a comparison of the two values using printable syntax.
@@ -386,7 +395,9 @@ SEXP will describe the structure desired."
(defalias 'map-bind 'kvmap-bind)
(defun kvplist-merge (&rest plists)
- "Merge the 2nd and subsequent plists into the first, clobbering values set by lists to the left."
+ "Merge the 2nd and subsequent plists into the first.
+
+Values set by lists to the left are clobbered."
(let ((result (car plists))
(plists (cdr plists)))
(loop for plist in plists do