0.pre7.38:
[sbcl.git] / src / code / list.lisp
index 4f78953..55f66c9 100644 (file)
 ;;;; -- WHN 20000127
 
 (declaim (maybe-inline
-         tree-equal list-length nth %setnth nthcdr last make-list append
-         copy-list copy-alist copy-tree revappend nconc nreconc butlast
-         nbutlast ldiff member member-if member-if-not tailp adjoin union
+         tree-equal nth %setnth nthcdr last make-list append
+         nconc member member-if member-if-not tailp adjoin union
          nunion intersection nintersection set-difference nset-difference
-         set-exclusive-or nset-exclusive-or subsetp acons pairlis assoc
+         set-exclusive-or nset-exclusive-or subsetp acons assoc
          assoc-if assoc-if-not rassoc rassoc-if rassoc-if-not subst subst-if
          subst-if-not nsubst nsubst-if nsubst-if-not sublis nsublis))
 
        list))))
 
 (defun ldiff (list object)
-  "Returns a new list, whose elements are those of List that appear before
-   Object. If Object is not a tail of List, a copy of List is returned.
-   List must be a proper list or a dotted list."
+  "Return a new list, whose elements are those of LIST that appear before
+   OBJECT. If OBJECT is not a tail of LIST, a copy of LIST is returned.
+   LIST must be a proper list or a dotted list."
   (do* ((list list (cdr list))
        (result (list ()))
        (splice result))
 
 (defun rplaca (x y)
   #!+sb-doc
-  "Changes the car of x to y and returns the new x."
+  "Change the CAR of X to Y and return the new X."
   (rplaca x y))
 
 (defun rplacd (x y)
   #!+sb-doc
-  "Changes the cdr of x to y and returns the new x."
+  "Change the CDR of X to Y and return the new X."
   (rplacd x y))
 
 ;;; The following are for use by SETF.
 
 (defun %rplacd (x val) (rplacd x val) val)
 
+;;; Set the Nth element of LIST to NEWVAL.
 (defun %setnth (n list newval)
   (declare (type index n))
-  #!+sb-doc
-  "Sets the Nth element of List (zero based) to Newval."
   (do ((count n (1- count))
        (list list (cdr list)))
       ((endp list)
 
 (defun identity (thing)
   #!+sb-doc
-  "Returns what was passed to it."
+  "This function simply returns what was passed to it."
   thing)
 
 (defun complement (function)
   #!+sb-doc
-  "Builds a new function that returns T whenever FUNCTION returns NIL and
+  "Return a new function that returns T whenever FUNCTION returns NIL and
    NIL whenever FUNCTION returns non-NIL."
   (lambda (&optional (arg0 nil arg0-p) (arg1 nil arg1-p) (arg2 nil arg2-p)
                     &rest more-args)
 
 (defun assoc-if-not (predicate alist &key key)
   #!+sb-doc
-  "Returns the first cons in alist whose car does not satisfiy the Predicate.
-  If key is supplied, apply it to the car of each cons before testing."
+  "Returns the first cons in ALIST whose car does not satisfy the PREDICATE.
+  If KEY is supplied, apply it to the car of each cons before testing."
   (if key
       (assoc-guts (not (funcall predicate (funcall key (caar alist)))))
       (assoc-guts (not (funcall predicate (caar alist))))))
 (defun rassoc (item alist &key key test test-not)
   (declare (list alist))
   #!+sb-doc
-  "Returns the cons in alist whose cdr is equal (by a given test or EQL) to
-   the Item."
+  "Returns the cons in ALIST whose cdr is equal (by a given test or EQL) to
+   the ITEM."
   (cond (test
         (if key
             (assoc-guts (funcall test item (funcall key (cdar alist))))