net.sf.arise.piji.fun
Class LambdaFunction

java.lang.Object
  |
  +--net.sf.arise.piji.AbstractFunction
        |
        +--net.sf.arise.piji.fun.LambdaFunction
All Implemented Interfaces:
Function

public final class LambdaFunction
extends AbstractFunction

lambda creates a new function, with or without a documentation string. Example with documentation:

   (lambda (x y)
     "This function takes two numbers and adds them"
     (+ x y))
 

Author:
Kjetil Valstadsve

Constructor Summary
LambdaFunction(Context ctx)
           
 
Method Summary
 java.lang.Object apply(Context context, Expression[] nodes)
          Applies the function to a set of values in a given context and returns the result
 
Methods inherited from class net.sf.arise.piji.AbstractFunction
checkArgumentCount, checkLeaf, checkLeaf, checkList, checkList, checkString, checkString, checkSymbol, checkSymbol, checkSymbol, checkSymbol, fillContext, fillContext, getArgumentCount, getContext, getDocumentationString, isLeaf, isList, isString, isSymbol, isVararg
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LambdaFunction

public LambdaFunction(Context ctx)
Method Detail

apply

public java.lang.Object apply(Context context,
                              Expression[] nodes)
                       throws java.lang.Throwable
Description copied from interface: Function
Applies the function to a set of values in a given context and returns the result

Specified by:
apply in interface Function
Specified by:
apply in class AbstractFunction
Parameters:
context - The context to apply this function in
Returns:
The result of the function applied to the arguments in the context
java.lang.Throwable


All code and documentation is

Copyright (c) : 2000-2003 Kjetil Valstadsve & Maja S. Bratseth