kawa.standard
Class map

java.lang.Object
  extended by gnu.mapping.PropertySet
      extended by gnu.mapping.Procedure
          extended by gnu.mapping.ProcedureN
              extended by kawa.standard.map
All Implemented Interfaces:
CanInline, Named

public class map
extends ProcedureN
implements CanInline

Implement the Scheme standard functions "map" and "for-each".


Field Summary
 
Fields inherited from class gnu.mapping.ProcedureN
noArgs
 
Constructor Summary
map(boolean collect)
           
 
Method Summary
 java.lang.Object apply2(java.lang.Object arg1, java.lang.Object arg2)
           
 java.lang.Object applyN(java.lang.Object[] args)
           
static void forEach1(Procedure proc, java.lang.Object list)
          An optimized single-list version of for-each.
 Expression inline(ApplyExp exp, ExpWalker walker)
          Inline an application of this Procedure and return result.
static java.lang.Object map1(Procedure proc, java.lang.Object list)
          An optimized single-list version of map.
 
Methods inherited from class gnu.mapping.ProcedureN
apply0, apply1, apply3, apply4
 
Methods inherited from class gnu.mapping.Procedure
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getSetter, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, numArgs, set0, set1, setN, setSetter, setSourceLocation, toString
 
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

map

public map(boolean collect)
Method Detail

map1

public static java.lang.Object map1(Procedure proc,
                                    java.lang.Object list)
                             throws java.lang.Throwable
An optimized single-list version of map.

Throws:
java.lang.Throwable

forEach1

public static void forEach1(Procedure proc,
                            java.lang.Object list)
                     throws java.lang.Throwable
An optimized single-list version of for-each.

Throws:
java.lang.Throwable

apply2

public java.lang.Object apply2(java.lang.Object arg1,
                               java.lang.Object arg2)
                        throws java.lang.Throwable
Overrides:
apply2 in class ProcedureN
Throws:
java.lang.Throwable

applyN

public java.lang.Object applyN(java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
applyN in class ProcedureN
Throws:
java.lang.Throwable

inline

public Expression inline(ApplyExp exp,
                         ExpWalker walker)
Description copied from interface: CanInline
Inline an application of this Procedure and return result. Can return original expression.

Specified by:
inline in interface CanInline