summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-06-27 11:26:11 +0200
committerAndy Wingo <wingo@pobox.com>2013-06-27 22:02:42 +0200
commit5da2aae3644a9ff9508db9501c50762f6e19cc97 (patch)
treed7258a42a86f25b82baf462bdc68b24595855961
parent39caffe79b3d159590b5ce1ccf8fe28c3d5cfdc6 (diff)
downloadguile-5da2aae3644a9ff9508db9501c50762f6e19cc97.tar.gz
remove apply:nconc2last
* libguile/eval.c (scm_nconc2last): Remove, now unused. * doc/ref/api-evaluation.texi (Fly Evaluation): Remove docs.
-rw-r--r--doc/ref/api-evaluation.texi12
-rw-r--r--libguile/eval.c41
2 files changed, 0 insertions, 53 deletions
diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi
index 63b1d6059..f0edd1153 100644
--- a/doc/ref/api-evaluation.texi
+++ b/doc/ref/api-evaluation.texi
@@ -573,18 +573,6 @@ Call @var{proc} with the array of arguments @var{argv}, as a
@var{nargs}, as a @code{size_t}.
@end deffn
-@deffn {Scheme Procedure} apply:nconc2last lst
-@deffnx {C Function} scm_nconc2last (lst)
-@var{lst} should be a list (@var{arg1} @dots{} @var{argN}
-@var{arglst}), with @var{arglst} being a list. This function returns
-a list comprising @var{arg1} to @var{argN} plus the elements of
-@var{arglst}. @var{lst} is modified to form the return. @var{arglst}
-is not modified, though the return does share structure with it.
-
-This operation collects up the arguments from a list which is
-@code{apply} style parameters.
-@end deffn
-
@deffn {Scheme Procedure} primitive-eval exp
@deffnx {C Function} scm_primitive_eval (exp)
Evaluate @var{exp} in the top-level environment specified by
diff --git a/libguile/eval.c b/libguile/eval.c
index 8494e10a0..162fd54dc 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -607,47 +607,6 @@ scm_apply_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM args)
SCM_EOL);
}
-/* This code processes the arguments to apply:
-
- (apply PROC ARG1 ... ARGS)
-
- Given a list (ARG1 ... ARGS), this function conses the ARG1
- ... arguments onto the front of ARGS, and returns the resulting
- list. Note that ARGS is a list; thus, the argument to this
- function is a list whose last element is a list.
-
- Apply calls this function, and applies PROC to the elements of the
- result. apply:nconc2last takes care of building the list of
- arguments, given (ARG1 ... ARGS).
-
- Rather than do new consing, apply:nconc2last destroys its argument.
- On that topic, this code came into my care with the following
- beautifully cryptic comment on that topic: "This will only screw
- you if you do (scm_apply scm_apply '( ... ))" If you know what
- they're referring to, send me a patch to this comment. */
-
-SCM_DEFINE (scm_nconc2last, "apply:nconc2last", 1, 0, 0,
- (SCM lst),
- "Given a list (@var{arg1} @dots{} @var{args}), this function\n"
- "conses the @var{arg1} @dots{} arguments onto the front of\n"
- "@var{args}, and returns the resulting list. Note that\n"
- "@var{args} is a list; thus, the argument to this function is\n"
- "a list whose last element is a list.\n"
- "Note: Rather than do new consing, @code{apply:nconc2last}\n"
- "destroys its argument, so use with care.")
-#define FUNC_NAME s_scm_nconc2last
-{
- SCM *lloc;
- SCM_VALIDATE_NONEMPTYLIST (1, lst);
- lloc = &lst;
- while (!scm_is_null (SCM_CDR (*lloc)))
- lloc = SCM_CDRLOC (*lloc);
- SCM_ASSERT (scm_ilength (SCM_CAR (*lloc)) >= 0, lst, SCM_ARG1, FUNC_NAME);
- *lloc = SCM_CAR (*lloc);
- return lst;
-}
-#undef FUNC_NAME
-
SCM
scm_map (SCM proc, SCM arg1, SCM args)