www.delorie.com/gnu/docs/kawa/kawa_30.html   search  
Buy GNU books!

Kawa, the Java-based Scheme system

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.5 Procedures

Function: apply proc [arg1 ...] args
Args must be a sequence (list, vector, or string) or a primitive Java array. (This is an extension over standard Scheme, which requires that args be a list.) Calls the proc (which must be a procedure), using as arguments the arg1... values plus all the elements of args.

Syntax: constant-fold proc arg1 ...
Same as (proc arg1 ...), unless proc and all the following arguments are compile-time constants. (That is: They are either constant, or symbols that have a global binding and no lexical binding.) In that case, proc is applied to the arguments at compile-time, and the result replaces the constant-fold form. If the application raises an exception, a compile-time error is reported. For example:
(constant-fold vector 'a 'b 'c)
is equivalent to (quote #(a b c)), assuming vector has not been re-bound.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003