[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
list versus apply
From: |
Kevin Ryde |
Subject: |
list versus apply |
Date: |
Thu, 21 Apr 2005 08:22:16 +1000 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
Looks like list doesn't produce a new list when called through apply,
(define x '(1 2 3))
(define y (apply list x))
(eq? x y)
=> #t
I'm looking at the fix below. This removes the C level scm_list, but
that should be ok, it's not documented and does nothing.
--- list.c.~1.58.2.7.~ 2004-05-02 07:19:23.000000000 +1000
+++ list.c 2005-04-20 16:31:40.725063792 +1000
@@ -117,17 +117,6 @@
}
-SCM_DEFINE (scm_list, "list", 0, 0, 1,
- (SCM objs),
- "Return a list containing @var{objs}, the arguments to\n"
- "@code{list}.")
-#define FUNC_NAME s_scm_list
-{
- return objs;
-}
-#undef FUNC_NAME
-
-
#if (SCM_DEBUG_DEPRECATED == 0)
SCM_REGISTER_PROC (s_list_star, "list*", 1, 0, 1, scm_cons_star);
@@ -547,6 +536,13 @@
}
#undef FUNC_NAME
+
+SCM_PROC (s_list, "list", 0, 0, 1, scm_list_copy);
+SCM_SNARF_DOCS (register, scm_list_copy, "list", (SCM objs), 0, 0, 1,
+ "Return a list containing @var{objs}, the arguments to\n"
+ "@code{list}.")
+
+
/* membership tests (memq, memv, etc.) */
- list versus apply,
Kevin Ryde <=