Skip to content

Instantly share code, notes, and snippets.

View bocharovf's full-sized avatar

Philipp Bocharov bocharovf

  • MTS
View GitHub Profile
(function () {
var apply = Function.prototype.apply;
var flatten = apply.bind(Array.prototype.concat, []);
Array.prototype.selectMany = function (fn) {
return flatten(this.map(fn));
};
}());
// usage