* Removed duplicate implementation of list*.
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Fri, 16 Jun 2000 12:38:41 +0000 (12:38 +0000)
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Fri, 16 Jun 2000 12:38:41 +0000 (12:38 +0000)
ice-9/ChangeLog
ice-9/common-list.scm
libguile/ChangeLog
libguile/list.c

index 2f8e9c5..cf2eb83 100644 (file)
@@ -1,3 +1,8 @@
+2000-06-16  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * common-list.scm (list*):  Removed, since this function is
+       implemented as a primitive in libguile/list.c.
+
 2000-06-12  Mikael Djurfeldt  <mdj@thalamus.nada.kth.se>
 
        * session.scm (help): Warn user if 'regex isn't provided.
index 49889e6..fea6b87 100644 (file)
@@ -199,18 +199,6 @@ Returns everything that's left."
        ((member (car lst) (cdr lst)) #t)
        (else (has-duplicates? (cdr lst)))))
 
-(define-public (list* x . y)
-  "Works like `list' except that the cdr of the last pair is
-the last argument unless there is only one argument, when
-th result is just that argument.  Sometiems called cons*."
-  (define (list*1 x)
-    (if (null? (cdr x))
-       (car x)
-       (cons (car x) (list*1 (cdr x)))))
-  (if (null? y)
-      x
-      (cons x (list*1 y))))
-
 (define-public (pick p l)
   "Apply P to each element of L, returning a list of elts
 for which P returns a non-#f value."
index 1f7b246..9d45a17 100644 (file)
@@ -1,3 +1,7 @@
+2000-06-16  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * list.c (list*):  Added documentation from common-list.scm.
+
 2000-06-15  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
        * gc.c (scm_unprotect_object):  The reference count is guaranteed
index dab7747..2d9b7e7 100644 (file)
@@ -91,7 +91,10 @@ SCM_DEFINE (scm_list, "list", 0, 0, 1,
 
 SCM_DEFINE (scm_list_star, "list*", 1, 0, 1, 
             (SCM arg, SCM rest),
-           "Return an improper list of the arguments.")
+           "Works like `list' except that it returns an improper list of\n"
+           "the arguments, where the last argument is the cdr of the last\n"
+           "pair.  If there is only one argument then the result is just\n"
+           "that argument.  Sometimes this function is called cons*.")
 #define FUNC_NAME s_scm_list_star
 {
   SCM_VALIDATE_REST_ARGUMENT (rest);