[funds-cvs] r170 - trunk/funds/src
abaine at common-lisp.net
abaine at common-lisp.net
Sun Aug 19 16:57:02 UTC 2007
Author: abaine
Date: Sun Aug 19 12:57:02 2007
New Revision: 170
Modified:
trunk/funds/src/f-array.lisp
Log:
Documented f-array.
Modified: trunk/funds/src/f-array.lisp
==============================================================================
--- trunk/funds/src/f-array.lisp (original)
+++ trunk/funds/src/f-array.lisp Sun Aug 19 12:57:02 2007
@@ -2,6 +2,7 @@
(in-package :funds)
(defun make-f-array (size &key (initial-contents nil))
+ "A functional array of the given size with the given initial contents."
(let ((length (length initial-contents)))
(labels ((f (start end)
(if (= start end)
@@ -16,12 +17,16 @@
(f 0 size))))
(defun f-array-elt (array index)
+ "The element at the given index of the given array."
(tree-find array index :test #'=))
-(defun f-array-replace (array index item)
- (tree-insert array index item :test #'=))
+(defun f-array-replace (array index element)
+ "An array similar to the given array except that index and element are
+associated in the returned array."
+ (tree-insert array index element :test #'=))
(defun f-array-size (array)
+ "The number of elements in the given array."
(labels ((f (tree amount)
(if (tree-empty-p tree)
amount
More information about the Funds-cvs
mailing list