fix console.log higher-order calls in docs

This commit is contained in:
Leo Horie 2014-07-22 16:39:35 -04:00
parent d3c9a28c25
commit 9a00707eeb
3 changed files with 17 additions and 5 deletions

View file

@ -137,10 +137,12 @@ dashboard.controller = function() {
dashboard.view = function(ctrl) {
return m("#example", [
new autocompleter.view(ctrl.autocompleter, {onchange: m.withAttr("value", console.log)}),
new autocompleter.view(ctrl.autocompleter, {onchange: m.withAttr("value", log)}),
]);
};
//an FP-friendly console.log
var log = function(value) {console.log(value)}
//initialize