A classfile enables Auto Lambda for a specific set of commands by adding an autolambda directive to its gox.mod:
autolambda times(1), forEver(0), onKey(1)
Each entry has the form name(n), where:
name is the command's identifier (the function/method name as called in XGo source, e.g. times, forEver, onKey).
n is the number of non-lambda arguments the command takes, i.e. the arguments that appear before the (now implicit) trailing lambda.
For example:
| Directive entry |
Full call form |
Meaning |
times(1) |
times 3, => { ... } |
1 argument (3) before the lambda |
forEver(0) |
forEver => { ... } |
0 arguments before the lambda |
onKey(1) |
onKey KeySpace, => { ... } |
1 argument (KeySpace) before the lambda |
A single gox.mod may declare Auto Lambda for multiple commands in one directive, as shown above, or across multiple autolambda lines.
A classfile enables Auto Lambda for a specific set of commands by adding an
autolambdadirective to itsgox.mod:Each entry has the form
name(n), where:nameis the command's identifier (the function/method name as called in XGo source, e.g.times,forEver,onKey).nis the number of non-lambda arguments the command takes, i.e. the arguments that appear before the (now implicit) trailing lambda.For example:
times(1)times 3, => { ... }3) before the lambdaforEver(0)forEver => { ... }onKey(1)onKey KeySpace, => { ... }KeySpace) before the lambdaA single
gox.modmay declare Auto Lambda for multiple commands in one directive, as shown above, or across multipleautolambdalines.