| kind | = | "LexicalBlock" |
A lexical block allows you to delay a computation in a specific lexical context. See DefaultMethod#fn for detailed documentation.
Mimics
Inactive cells
Active cells
- &(other)
- ->(other)
- <-(other)
- ===(other)
- argumentNames()
- argumentsCode()
- arity()
- call(+[arguments])
- code()
- complement()
- createFrom(messageList, lexicalContext)
- formattedCode()
- inspect()
- iterate(+args)
- java:coerceCode(javaType, abstractNames)
- keywords()
- message()
- notice()
- |(other)
- ∘(other)
Specs
Inactive cells (details)
Active cells (details)
nil
[ show source ]
method(other,
outsideSelf = self
if(cell?(:activatable) &&(activatable),
fnx(arg,
res1 = cell(:outsideSelf) call(arg)
res2 = cell(:other) call(arg)
res1 &&(res2)),
fn(arg,
res1 = cell(:outsideSelf) call(arg)
res2 = cell(:other) call(arg)
res1 &&(res2))))
nil
[ show source ]
method(other,
outsideSelf = self
if(cell?(:activatable) &&(activatable),
fnx(arg, cell(:other) call(cell(:outsideSelf) call(arg))),
fn(arg, cell(:other) call(cell(:outsideSelf) call(arg)))))
nil
[ show source ]
method(other,
outsideSelf = self
if(cell?(:activatable) &&(activatable),
fnx(arg, cell(:outsideSelf) call(cell(:other) call(arg))),
fn(arg, cell(:outsideSelf) call(cell(:other) call(arg)))))
nil
[ show source ]
method(other,
if(self same?(
#<LexicalBlock:5D15126E>),
Reflector other:mimics?(cell(:other),
#<LexicalBlock:5D15126E>),
bind(rescue(Condition Error, fn(c, false)),
self call(
other))))
invokes the block with the arguments provided, returning the result of the last expression in the block
nil
[ show source ]
method(
outsideSelf = self
if(cell?(:activatable) &&(activatable),
fnx(arg, !(cell(:outsideSelf) call(arg))),
fn(arg, !(cell(:outsideSelf) call(arg)))))
takes two evaluated arguments, where this first one is a list of messages which will be used as the arguments and the code, and the second is the context where this lexical scope should be created in
Returns an infinite sequence that will in turn yield args, self(args), self(self(args)), etc
[ show source ]
method(+args, Sequence Iterate with(currentValue: args, code: self) )
nil
[ show source ]
method(javaType, abstractNames,
proxy = integrate(javaType) mimic
outerSelf = self
abstractNames each(name,
proxy cell(name) = fnx(+(rest), +:(krest), cell(:outerSelf) call(*(rest), *(krest)))
)
proxy new
)
nil
[ show source ]
method(other,
outsideSelf = self
if(cell?(:activatable) &&(activatable),
fnx(arg,
res1 = cell(:outsideSelf) call(arg)
res2 = cell(:other) call(arg)
res1 ||(res2)),
fn(arg,
res1 = cell(:outsideSelf) call(arg)
res2 = cell(:other) call(arg)
res1 ||(res2))))
nil
[ show source ]
method(other,
outsideSelf = self
if(cell?(:activatable) &&(activatable),
fnx(arg, cell(:outsideSelf) call(cell(:other) call(arg))),
fn(arg, cell(:outsideSelf) call(cell(:other) call(arg)))))