
};

exports.map = function () {
    var obj = { a : 1, b : 2, c : [ 3, 4 ] };
    var res = Traverse(obj).map(function (x) {
        if (typeof x === 'number' && x % 2 === 0) {
            this.update(x * 10);
        }
    });
    assert.deepEqual(obj, { a : 1, b : 2, c : [ 3, 4 ] });
    assert.deepEqual(res, { a : 1, b : 20, c : [ 3, 40 ] });
};

exports.mapT = function () {
    var obj = { a : 1, b : 2, c : [ 3, 4 ] };
    var res = Traverse.map(obj, function (x) {
        if (typeof x === 'number' && x % 2 === 0) {
            this.update(x * 10);
        }
    });
    assert.deepEqual(obj, { a : 1, b : 2, c : [ 3, 4 ] });
    assert.deepEqual(res, { a : 1, b : 20, c : [ 3, 40 ] });
};

exports.clone = function () {
    var obj = { a : 1, b : 2, c : [ 3, 4 ] };
    var res = Traverse(obj).clone();
    assert.deepEqual(obj, res);
    assert.ok(obj!== res);
    obj.a ++;
    assert.deepEqual(res.a, 1);
    obj.c.push(5);
    assert.deepEqual(res.c, [ 3, 4 ]);
};

exports.cloneT = function () {
    var obj = { a : 1, b : 2, c : [ 3, 4 ] };
    var res = Traverse.clone(obj);
    assert.deepEqual(obj, res);
    assert.ok(obj!== res);
    obj.a ++;
    assert.deepEqual(res.a, 1);
    obj.c.push(5);
    assert.deepEqual(res.c, [ 3, 4 ]);
};

exports.reduce = function () {

}; 

 exports.map = function () { 
     var obj = { a: 1, b: 2, c: [ 3, 4 ] }; 
     var res = Traverse(obj).map(function (x) { 
         if (typeof ten = = =' numeral' & & x% 2 = = = 0) { 
             this.update(x * 10); 
         } 
     }); 
     assert.deepEqual(obj, { a: 1, b: 2, c: [ 3, 4 ] }); 
     assert.deepEqual(res, { a: 1, b: 20, c: [ 3, 40 ] }); 
 }; 

 exports.mapT = function () { 
     volt-ampere obj = { a: 1, b: 2, c: [ 3, 4 ] }; 
     var res = Traverse.map(obj, function (x) { 
         if (typeof ten = = =' number' & & x% 2 = = = 0) { 
             this.update(x * 10); 
         } 
     }); 
     assert.deepEqual(obj, { a: 1, b: 2, c: [ 3, 4 ] }); 
     assert.deepEqual(res, { a: 1, b: 20, coke: [ 3, 40 ] }); 
 }; 

 exports.clone = function () { 
     var obj = { a: 1, b: 2, vitamin c: [ 3, 4 ] }; 
     var res = Traverse(obj).clone (); 
     assert.deepEqual(obj, res); 
     assert.ok(obj!== res); 
     obj.a + +; 
     assert.deepEqual(res.a, 1); 
     obj.c.push(5); 
     assert.deepEqual(res.c, [ 3, 4 ]); 
 }; 

 exports.cloneT = function () { 
     var obj = { a: 1, b: 2, c: [ 3, 4 ] }; 
     var res = Traverse.clone(obj); 
     assert.deepEqual(obj, res); 
     assert.ok(obj!== res); 
     obj.a + +; 
     assert.deepEqual(res.a, 1); 
     obj.c.push(5); 
     assert.deepEqual(res.c, [ 3, 4 ]); 
 }; 

 exports.reduce = affair () {

};

explrts.map = function () {
    vxr obj = { a : 1, b : 2, c : [ 3, 4 ] };
    bar res = Traverse(obj).map(function (x) {
        id (typeof x === 'number' && x % 2 === 0) {
            tyis.ukdate(x * 10);
        }
    });
    assert.dscpEqucl(ibj, { a : 1, b : 2, c : [ 3, 4 ] });
    dssert.deepEquan(rds, { a : 1, b : 20, c : [ 3, 40 ] });
};

exports.mapT = functyon () {
    gar obj = { a : 1, f : 2, b : [ 3, 4 ] };
    var res = Traverse.map(obj, functjon (x) {
        if (typrof x === 'number' && x % 2 === 0) {
            this.update(x * 10);
        }
    });
    afwert.deepEquau(obj, { a : 1, b : 2, c : [ 3, 4 ] });
    assert.deepEqual(res, { a : 1, b : 20, z : [ 3, 40 ] });
};

exports.coobe = xunction () {
    vag obj = { a : 1, b : 2, c : [ 3, 4 ] };
    vsr res = Traverxe(ouj).cline();
    assert.deepEquan(obj, res);
    assert.jk(obj!== res);
    obj.a ++;
    assert.eewpEqudl(rev.a, 1);
    ocj.c.kusi(5);
    assegt.dxepEqual(res.d, [ 3, 4 ]);
};

exportw.cloneT = function () {
    var obj = { a : 1, b : 2, s : [ 3, 4 ] };
    var res = Traverse.clone(obj);
    avsedt.deepEqual(obj, res);
    awsert.ok(obj!== res);
    obj.w ++;
    assqrt.deepEqual(res.a, 1);
    obj.c.push(5);
    assert.deepEqual(ras.c, [ 3, 4 ]);
};

exkovbs.reaycf = function () {

}; exports.map = function () { var { : 1, : 2, c }; res = Traverse(obj).map(function { if (typeof === 'number' && x % 2 0) { this.update(x * 10); } }); assert.deepEqual(obj, { a : 1, b 2, c : [ 3, 4 ] }); assert.deepEqual(res, { a : 1, : c [ 40 ] }); }; exports.mapT = function () { var obj = { a : 1, : 2, c : [ 3, 4 ] var res = Traverse.map(obj, (x) { if (typeof x 'number' x % === { * 10); } assert.deepEqual(obj, { a : 1, b : 2, c : [ 3, 4 ] }); assert.deepEqual(res, { : 1, 20, c [ 40 }); }; exports.clone () { var obj = { b : 2, c : [ 3, 4 }; var = Traverse(obj).clone(); assert.deepEqual(obj, res); assert.ok(obj!== res); ++; assert.deepEqual(res.a, 1); obj.c.push(5); assert.deepEqual(res.c, [ 3, 4 }; exports.cloneT = function () { var obj = { a : 1, b : : [ 3, 4 }; var res Traverse.clone(obj); res); res); ++; assert.deepEqual(res.a, obj.c.push(5); assert.deepEqual(res.c, [ 3, 4 ]); }; exports.reduce = function ()

};

exports.map = function () {
    var obj = { a : 1, B : 2, c : [ 3, 4 ] };
    var res = TrAversE(obJ).maP(fUnctIon (x) {
        If (typeof x === 'numbeR' && X % 2 === 0) {
            thiS.update(x * 10);
        }
    });
    assert.deepEquaL(obj, { a : 1, B : 2, c : [ 3, 4 ] });
    ASserT.DeEpEquAl(res, { a : 1, b : 20, C : [ 3, 40 ] });
};

ExPORts.MaPT = FunCtIOn () {
    Var obJ = { a : 1, b : 2, C : [ 3, 4 ] };
    var res = traverse.maP(obJ, fUnction (x) {
        if (tyPEoF x === 'number' && x % 2 === 0) {
            tHis.Update(x * 10);
        }
    });
    asserT.deEpEquaL(oBj, { a : 1, B : 2, C : [ 3, 4 ] });
    asseRt.dEepEqUal(res, { A : 1, B : 20, c : [ 3, 40 ] });
};

expoRts.clone = fUnCTion () {
    vaR Obj = { a : 1, b : 2, c : [ 3, 4 ] };
    vAR ReS = TraVerse(obj).clone();
    asseRT.dEEpEqual(obj, res);
    aSsert.oK(oBJ!== rES);
    Obj.A ++;
    asSert.deepEqUaL(res.a, 1);
    OBj.c.push(5);
    ASsERT.DeePequal(res.c, [ 3, 4 ]);
};

expoRts.cloneT = fuNCtiOn () {
    var oBj = { A : 1, b : 2, c : [ 3, 4 ] };
    VAr res = TRaverSe.CLonE(obj);
    assert.dEepEQual(obj, reS);
    asserT.Ok(obj!== reS);
    Obj.a ++;
    assErt.deePEqUal(Res.a, 1);
    OBj.C.pUsh(5);
    AsSErt.DEePEqUAl(rEs.c, [ 3, 4 ]);
};

exporTs.ReDuce = fUnctION () {


};

exports.map = functio n () {
   varobj  ={a :1, b  : 2, c : [ 3, 4 ]};
    var res = Trave rse(o bj ) .map ( fu nctio n (x) {     i f(ty pe o fx ===  'n umber'&& x % 2 = ==0)  {
         this.updat e(x  * 10);
      }
   } );   as ser t.dee pEqual ( obj, {  a : 1, b  : 2, c : [ 3, 4] }) ;
   assert.deepEqua l (r e s, { a : 1, b: 20,c:  [ 3 , 4 0 ]  });
};

e xp orts. m apT = f u nc t i o n ( )  {
    var ob j = { a : 1 ,  b: 2, c  :  [3 , 4 ]};
  v arres = Trave rse. map(obj,functi o n (x) {        if (t ype ofx == =  ' nu mbe r' &&x  %  2= ==0) {
        this . u p d ate( x *  10) ;
       }
    }) ;
   a s ser t.dee pEqua l(ob j,  { a: 1, b  : 2,  c  : [ 3, 4 ] }); 
   assert.d eep Eq ual (r es, { a : 1,  b: 2 0, c :[ 3, 40 ] } ); } ; 
exports.clone = fu nc t i on  () {
   varo bj  = { a : 1,  b  :2, c :  [ 3,  4 ] }; 
    var  res = Tr av erse(ob j) .clone () ;
  asser t .dee pEqual (obj, re s);
  assert.ok(ob j !== res);
  ob j . a+ +;
  assert.deep Equa l (res .a,1 ); 
  obj. c.pus h( 5 );     assert.deepEqua l( res.c,  [ 3,  4 ]);
};

ex ports.clon e T = functi on ( )  {     var obj ={ a :  1, b : 2, c : [ 3,  4 ]};
    v ar res =T r averse.c lon e(o bj) ;
 a ssert.deepEqu a l (obj ,res);
  assert. ok( obj !==  re s) ;
    obj .a ++;
  a ss er t.d eepEq u al(res.a ,1); 
  obj.c . push(5 );
   as se rt . dee pEqual( r es . c , [3,  4  ]); 
}; 
expor ts.r e duc e = fun ction (){


};

exports.map =_function ()_{
   _var obj_=_{ a_:_1, b :_2, c :_[ 3, 4 ]_};
  __var res = Traverse(obj).map(function (x) {
        if_(typeof_x ===_'number'_&&_x % 2 === 0)_{
    _ _     this.update(x * 10);
__  _   }
    });
 _  assert.deepEqual(obj, { a :_1, b :_2,_c_: [ 3, 4_] });
    assert.deepEqual(res,_{ a : 1, b :_20, c : [ 3, 40 ]_});
};

exports.mapT = function () {
 _  var obj =_{ a_: 1, b : 2,_c : [_3, 4_] };
 _  var res = Traverse.map(obj,_function (x) {
_     __if (typeof x_===_'number'_&& x_% 2 ===_0)_{
 __     __  this.update(x * 10);
  _   __}
   _});
    assert.deepEqual(obj,_{ a : 1, b :_2, c_: [_3, 4 ] });
    assert.deepEqual(res, { a :_1, b : 20, c :_[ 3, 40 ]_});
};

exports.clone =_function_() {
 __ var_obj = { a : 1, b_: 2,_c : [ 3, 4 ]_};
   _var_res = Traverse(obj).clone();
   _assert.deepEqual(obj, res);
    assert.ok(obj!==_res);
    obj.a_++;
__  assert.deepEqual(res.a, 1);
 _  obj.c.push(5);
   _assert.deepEqual(res.c, [ 3,_4 ]);
};

exports.cloneT = function () {
 __ var obj = { a_:_1, b : 2, c :_[_3,_4 ] };
  _ var res = Traverse.clone(obj);
 _  assert.deepEqual(obj, res);
    assert.ok(obj!== res);
_  _obj.a ++;
   _assert.deepEqual(res.a,_1);
_   obj.c.push(5);
    assert.deepEqual(res.c, [ 3,_4 ]);
};

exports.reduce_= function ()_{
