Tags » currying

Deferrables

Imagine, if you will, some JavaScript models that look something like this: function User (…) { // initialise user } User.fromId = function (id, cb) { // 'returns' an error, or a User db.find(…, cb); } User.prototype.getGroups = function (cb) { // 'returns' an error, or an array of Groups db.find(…, cb); } function Group…

Continue →