hunk.code_window: 		memo = memo || [];
   		memo.push(iter(this));
   		this.children.forEach(function(child) { child.transform(iter, memo); });
   		return memo;
   	}
   	// setup
   	var node = new TreeNode('root')
  
hunk.labels: keep replace replace replace replace keep keep keep keep
hunk.after_edit: 		results = results || [];
   		results.push(iteratee(this));
   		this.children.forEach(function(child) { child.transform(iteratee, results); });
   		return results;
  
hunk.file_path: test/transform.js
hunk.type: replace
file: /**
   * mobservable
   * (c) 2015 - Michel Weststrate
   * https://github.com/mweststrate/mobservable
   */
  import {Lambda} from './interfaces';
  import {once} from './utils';
  
  export default class SimpleEventEmitter {
      listeners:{(data?):void}[] = [];
  
      emit(...data:any[]);
      emit() {
          var listeners = this.listeners.slice();
          var l = listeners.length;
          switch (arguments.length) {
              case 0:
                  for(var i = 0; i < l; i++)
                      listeners[i]();
                  break;
              case 1:
                  var data = arguments[0];
                  for(var i = 0; i < l; i++)
                      listeners[i](data);
                  break;
              default:
                  for(var i = 0; i < l; i++)
                      listeners[i].apply(null, arguments);
          }
      }
  
      on(listener:(...data:any[])=>void):Lambda {
          this.listeners.push(listener);
          return once(() => {
              var idx = this.listeners.indexOf(listener);
              if (idx !== -1)
                  this.listeners.splice(idx, 1);
          });
      }
  
      once(listener:(...data:any[])=>void):Lambda {
          var subscription = this.on(function() {
              subscription();
              listener.apply(this, arguments);
          });
          return subscription;
      }
  }