source: frontend/node_modules/underscore/amd/compose.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 454 bytes
Line 
1define(function () {
2
3 // Returns a function that is the composition of a list of functions, each
4 // consuming the return value of the function that follows.
5 function compose() {
6 var args = arguments;
7 var start = args.length - 1;
8 return function() {
9 var i = start;
10 var result = args[start].apply(this, arguments);
11 while (i--) result = args[i].call(this, result);
12 return result;
13 };
14 }
15
16 return compose;
17
18});
Note: See TracBrowser for help on using the repository browser.