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
          
   
Fields inherited from class Lens
name
 
Constructor Summary
LCcond(<Predicate> p, <Lens> pass_lens, <Lens> fail_lens)
           
 
Method Summary
 Object get(c)
          
 Object putback(a, c)
          
 
Methods inherited from class Lens
error, getput, putget, putput, get_is, putback_is, get_throws, putback_throws
 

Field Detail

name

Object name

Constructor Detail

LCcond

LCcond(<Predicate> p, <Lens> pass_lens, <Lens> fail_lens)

Method Detail

get

Object get(c)

putback

Object putback(a, c)


Documentation generated by JSDoc on Wed Feb 14 15:36:01 2007