Class LWmap

Object
   |
   +--Lens
         |
         +--LWmap

class LWmap
extends Lens


Maps different lenses over different properties; it is a generalization of LMap.

It has a slightly strange calling convention, to wit:


> wmap = new LWmap([prop1, prop2, prop3], lens1, prop4, lens2)

This will run lens1 over prop1, prop2, and prop3's values and lens2 on prop4. Any other properties are mapped through the id lens. There is an optional final argument, which may be set to false in order to have the presence of other properties constitute an error, e.g.:


> wmap_strict = new LWmap(p1, l1, [p2, p3], l2, false)
> wmap_strict.get({ p4: _ }) // _ is any value
error!

Defined in lens.js


Field Summary
 Object name
          
   
Fields inherited from class Lens
name
 
Constructor Summary
LWmap()
           
 
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

LWmap

LWmap()

Method Detail

get

Object get(c)

putback

Object putback(a, c)


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