Class LCcond
Object
|
+--Lens
|
+--LCcond
- class
LCcond
- extends Lens
Applies one of two lenses based on a predicate on the concrete tree. The
lens to apply on putback is selected by running the predicate on the
concrete tree again. Thus is lens is unoblivious, viz. dependent on the
concrete tree during putback.
LCcond is typically applied for simple type dispatch; for more complex,
structure-dependent conditionals, LAcond or LCond may be
more appropriate.
See:Defined in lens.js
|
Field Summary |
Object |
name
|
name
Object name
LCcond
LCcond(<Predicate> p, <Lens> pass_lens, <Lens> fail_lens)
Parameters:
p - A predicate on the concrete tree (a function, list, etc.)
pass_lens - The lens to run if p matches c
fail_lens - The lens to run if p does not match c
get
Object get(c)
putback
Object putback(a, c)
Documentation generated by
JSDoc on Wed Feb 14 15:36:01 2007