mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
* Removed duplicate implementation of list*.
This commit is contained in:
parent
6a19994066
commit
79494f15d3
4 changed files with 13 additions and 13 deletions
|
@ -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.
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue