define(["lodash"], function(_){ return { bindActionsMithril: function(actions, store, m) { var newActions = {}; store.subscribe(function() { m.endComputation(); }); _.each(actions, function(action, key){ newActions[key] = function() { var act; m.startComputation(); act = action.apply(this, arguments); if(typeof act === "function") { act(store.dispatch, store.getState); } else { store.dispatch(act); } } }); return newActions; } } });