/dick-chainy

A chaining experiment - let's make a chain

Primary LanguageJavaScriptMIT LicenseMIT

DICK CHAINY

Warning! This was a lunch hack experiment™!

Usage

var calculator = {
  add: function(x, y) { return x + y; },
  subtract: function(x, y) { return x - y; }
};

var calcy = Dick.Chainy(calculator);
var results = calcy(30)
  .add(20)
  .subtract(9)
  .ret();

console.log(results); // 41