kawa.standard
Class map
java.lang.Object
gnu.mapping.PropertySet
gnu.mapping.Procedure
gnu.mapping.ProcedureN
kawa.standard.map
- All Implemented Interfaces:
- CanInline, Named
public class map
- extends ProcedureN
- implements CanInline
Implement the Scheme standard functions "map" and "for-each".
|
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,
InlineCalls walker,
boolean argsInlined)
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.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
map
public map(boolean collect,
ApplyToArgs applyToArgs,
Declaration applyFieldDecl)
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,
InlineCalls walker,
boolean argsInlined)
- Description copied from interface:
CanInline
- Inline an application of this Procedure and return result.
Unless
argsInlined is true, then this method
is responsible for walking exp.getArgs();
you can handle this using exp.getArgs(walker, argsInlined).
(The exp.getFunction() has been walked, regardless.)
- Specified by:
inline in interface CanInline
argsInlined - true if the arguments have been inlined.
Can return original expression.