f5aa0f993a6e891ede86106d70a883ecb8d49b1e
2 * Curry - Function currying
3 * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
4 * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)
7 * @author Ariel Flesler
13 var args
= curry
.args(arguments
),
14 master
= arguments
.callee
,
17 return args
.length
>= fn
.length
? fn
.apply(self
,args
) : function(){
18 return master
.apply( self
, args
.concat(curry
.args(arguments
)) );
23 curry
.args = function( args
){
24 return Array
.prototype.slice
.call(args
);
27 Function
.prototype.curry = function(){