diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog index 2f8e9c5bd..cf2eb837c 100644 --- a/ice-9/ChangeLog +++ b/ice-9/ChangeLog @@ -1,3 +1,8 @@ +2000-06-16 Dirk Herrmann + + * common-list.scm (list*): Removed, since this function is + implemented as a primitive in libguile/list.c. + 2000-06-12 Mikael Djurfeldt * session.scm (help): Warn user if 'regex isn't provided. diff --git a/ice-9/common-list.scm b/ice-9/common-list.scm index 49889e6db..fea6b8764 100644 --- a/ice-9/common-list.scm +++ b/ice-9/common-list.scm @@ -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." diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 1f7b246a2..9d45a17bb 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,7 @@ +2000-06-16 Dirk Herrmann + + * list.c (list*): Added documentation from common-list.scm. + 2000-06-15 Dirk Herrmann * gc.c (scm_unprotect_object): The reference count is guaranteed diff --git a/libguile/list.c b/libguile/list.c index dab7747be..2d9b7e79d 100644 --- a/libguile/list.c +++ b/libguile/list.c @@ -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);