[funds-cvs] r190 - trunk/funds/src

abaine at common-lisp.net abaine at common-lisp.net
Mon Aug 20 15:48:04 UTC 2007


Author: abaine
Date: Mon Aug 20 11:48:04 2007
New Revision: 190

Modified:
   trunk/funds/src/dictionary.lisp
   trunk/funds/src/package.lisp
Log:
Added and exported dictionary-from-alist.

Modified: trunk/funds/src/dictionary.lisp
==============================================================================
--- trunk/funds/src/dictionary.lisp	(original)
+++ trunk/funds/src/dictionary.lisp	Mon Aug 20 11:48:04 2007
@@ -56,3 +56,9 @@
 			 (bt-value tree)
 			 (f (bt-right tree))))))
     (f (dict-tree d))))
+
+(defun dictionary-from-alist (alist)
+  (reduce #'(lambda (d pair)
+	      (dictionary-add d (car pair) (cdr pair)))
+	  alist
+	  :initial-value (make-dictionary)))
\ No newline at end of file

Modified: trunk/funds/src/package.lisp
==============================================================================
--- trunk/funds/src/package.lisp	(original)
+++ trunk/funds/src/package.lisp	Mon Aug 20 11:48:04 2007
@@ -66,6 +66,7 @@
 	   :dictionary-remove
 	   :dictionary-lookup
 	   :dictionary-as-alist
+	   :dictionary-from-alist
 
 	   :make-f-array
 	   :f-array-elt



More information about the Funds-cvs mailing list