HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8163d1e
)
* list.c (scm_list_star): New procedure.
author
Mikael Djurfeldt
<djurfeldt@nada.kth.se>
Thu, 11 Mar 1999 11:46:16 +0000
(11:46 +0000)
committer
Mikael Djurfeldt
<djurfeldt@nada.kth.se>
Thu, 11 Mar 1999 11:46:16 +0000
(11:46 +0000)
libguile/list.c
patch
|
blob
|
blame
|
history
diff --git
a/libguile/list.c
b/libguile/list.c
index
f12520e
..
d7683fb
100644
(file)
--- a/
libguile/list.c
+++ b/
libguile/list.c
@@
-93,6
+93,25
@@
scm_list(objs)
}
+SCM_PROC (s_list_star, "list*", 1, 0, 1, scm_list_star);
+
+SCM
+scm_list_star (SCM arg, SCM rest)
+{
+ if (SCM_NIMP (rest))
+ {
+ SCM prev = arg = scm_cons (arg, rest);
+ while (SCM_NIMP (SCM_CDR (rest)))
+ {
+ prev = rest;
+ rest = SCM_CDR (rest);
+ }
+ SCM_SETCDR (prev, SCM_CAR (rest));
+ }
+ return arg;
+}
+
+
\f
/* general questions about lists --- null?, list?, length, etc. */