/[guile]/guile/guile-core/doc/ref/scheme-evaluation.texi
ViewVC logotype

Diff of /guile/guile-core/doc/ref/scheme-evaluation.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by kryde, Wed Jun 4 16:32:25 2003 UTC revision 1.11 by kryde, Fri Jul 18 01:21:05 2003 UTC
# Line 215  While the code is evaluated, the given m Line 215  While the code is evaluated, the given m
215  The current module is restored when this procedure returns.  The current module is restored when this procedure returns.
216  @end deffn  @end deffn
217    
218    @deffn {Scheme Procedure} apply proc arg1 @dots{} argN arglst
219    @deffnx {C Function} scm_apply_0 (proc, arglst)
220    @deffnx {C Function} scm_apply_1 (proc, arg1, arglst)
221    @deffnx {C Function} scm_apply_2 (proc, arg1, arg2, arglst)
222    @deffnx {C Function} scm_apply_3 (proc, arg1, arg2, arg3, arglst)
223    @deffnx {C Function} scm_apply (proc, arg, rest)
224    @rnindex apply
225    Call @var{proc} with arguments @var{arg1} @dots{} @var{argN} plus the
226    elements of the @var{arglst} list.
227    
228    @code{scm_apply} takes parameters corresponding to a Scheme level
229    @code{(lambda (proc arg . rest) ...)}.  So @var{arg} and all but the
230    last element of the @var{rest} list make up
231    @var{arg1}@dots{}@var{argN} and the last element of @var{rest} is the
232    @var{arglst} list.  Or if @var{rest} is the empty list @code{SCM_EOL}
233    then there's no @var{arg1}@dots{}@var{argN} and @var{arg} is the
234    @var{arglst}.
235    
236    @var{arglst} is not modified, but the @var{rest} list passed to
237    @code{scm_apply} is modified.
238    @end deffn
239    
240    @deffn {C Function} scm_call_0 (proc)
241    @deffnx {C Function} scm_call_1 (proc, arg1)
242    @deffnx {C Function} scm_call_2 (proc, arg1, arg2)
243    @deffnx {C Function} scm_call_3 (proc, arg1, arg2, arg3)
244    Call @var{proc} with the given arguments.
245    @end deffn
246    
247  @deffn {Scheme Procedure} apply:nconc2last lst  @deffn {Scheme Procedure} apply:nconc2last lst
248  @deffnx {C Function} scm_nconc2last (lst)  @deffnx {C Function} scm_nconc2last (lst)
249  Given a list (@var{arg1} @dots{} @var{args}), this function  @var{lst} should be a list (@var{arg1} @dots{} @var{argN}
250  conses the @var{arg1} @dots{} arguments onto the front of  @var{arglst}), with @var{arglst} being a list.  This function returns
251  @var{args}, and returns the resulting list. Note that  a list comprising @var{arg1} to @var{argN} plus the elements of
252  @var{args} is a list; thus, the argument to this function is  @var{arglst}.  @var{lst} is modified to form the return.  @var{arglst}
253  a list whose last element is a list.  is not modified, though the return does share structure with it.
 Note: Rather than do new consing, @code{apply:nconc2last}  
 destroys its argument, so use with care.  
 @end deffn  
254    
255  @rnindex apply  This operation collects up the arguments from a list which is
256  @deffn {Scheme Procedure} apply proc arg1 @dots{} args  @code{apply} style parameters.
 @var{proc} must be a procedure and @var{args} must be a list.  Call  
 @var{proc} with the elements of the list @code{(append (list @var{arg1}  
 @dots{}) @var{args})} as the actual arguments.  
257  @end deffn  @end deffn
258    
259  @deffn {Scheme Procedure} primitive-eval exp  @deffn {Scheme Procedure} primitive-eval exp

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26