Um, looking at the source of 1.3 (no compat), Function.bind already does some currying.
http://jsfiddle.net/seanmonstar/cMez9/ On Wed, Dec 1, 2010 at 9:58 AM, doubleTap <a...@adambragg.com> wrote: > Hey Aaron, > > Maybe I do not understand my problem or I am not conveying it well > enough. I will work up a better example. > > Thank you, > > -doubleTap > > On Dec 1, 9:19 am, Aaron Newton <aa...@iminta.com> wrote: > > I thought the requirement was to pass arguments AND accept them? I.E. > pass > > x,y,z but the function is called by request and is passed variables by > that > > (response text and whatnot) and that you want your function to receive > both > > of them. If that's the case, you need to wrap. There's no function method > > (like pass) that lets you define arguments AND receive them. You could > write > > one though... Function.passWithArguments or whatever. It would basically > do > > the same thing I put in my first example. > > > > > > > > On Wed, Dec 1, 2010 at 6:19 AM, Robert <forpoc...@gmail.com> wrote: > > > Yes, it looks pass does the same thing, missed this one... > > > > > thanks > > > > > On Dec 1, 8:27 am, אריה גלזר <arieh.gla...@gmail.com> wrote: > > > > On Wed, Dec 1, 2010 at 9:27 AM, אריה גלזר <arieh.gla...@gmail.com> > > > wrote: > > > > > isn't this whay#pass is for? > > > > >http://mootools.net/docs/core/Types/Function#Function:pass > > > > > > typos... what Function#pass is for > > > > > > > On Wed, Dec 1, 2010 at 12:55 AM, doubleTap <a...@adambragg.com> > wrote: > > > > > > >> I have a function in a class like > > > > > > >> myfunc:function() { some fun statements; } > > > > > > >> Then I use it as a call back in an ajax call like > > > > > > >> new Request({url:opts.uri, onSuccess:this.myfunc.bind.(this, > > > > >> {'bob':'sally'}) }).send(); > > > > > > >> Now in my case I am running it all works fine except for the > argument > > > > >> I am passing in the bind. My essential question is: How do I bind > > > > >> arguments to a function in a way that allows for additional > arguments > > > > >> to be passed to it when called? > > > > > > >> In this case the call would be receiving the server response on > > > > >> success of the ajax request. I know I have done it before but I > think > > > > >> I lost that part of my brain to mardi gras last year. > > > > > > > -- > > > > > Arieh Glazer > > > > > אריה גלזר > > > > > 052-5348-561 > > > > > 5561 > > > > > > -- > > > > Arieh Glazer > > > > אריה גלזר > > > > 052-5348-561 > > > > 5561 >