//channel factory
//creates a channel to an object's field via an input function
function createChannel(obj, key){
return function(val){
obj[key] = val;
};
}
/*=> undefined
var test = {f: 3};
=> undefined
var channel = createChannel(test, 'f');
=> undefined
channel
=> [Function]
channel(66)
=> undefined
test
=> { f: 66 }*/