Sorry, I thought I had pushed 'stop' in time to stop the first
response.
On Feb 26, 4:16 pm, Anand Patil <anand.prabhakar.pa...@gmail.com>
wrote:
> Thanks for the responses, guys.
>
> >> - Partially apply a function to any of its arguments, not just the
> >> first one
> >That's already the case, haven't you made a little test ?
>
> I meant I want to apply it out of sequence, sorry.
>
> > You can easily partially apply to other arguments by doing this: #(fred %1
> > some-arg %2 other-arg).
>
> That makes sense, thanks, though it's not any easier to unapply than
> partial. I guess I could make a new 'partial-like' function that
> returns code to apply a function, with nil's in unapplied argument
> slots... ?
>
> > Not possible as far as I know. Could you please explain use cases you have
> > in mind for such a feature ?
>
> Sure, it's the lazy cells I've been working on. When a cell's parent
> changes, I don't want it to compute right away- I want it to recognize
> the new value, but switch to an un-evaluated state. Since the cell has
> no value, it would be nice if its children could just un-apply their
> update functions on it.
>
> I won't explain how I'm doing it right now for fear of muddying the
> waters, but it feels overcomplicated and un-idiomatic.
>
> Thanks,
> Anand
>
> On Feb 26, 4:00 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote:
>
> > 2009/2/26 Jeffrey Straszheim <straszheimjeff...@gmail.com>
>
> > > "partial" is a currying function. It can be provided any number of
> > > parameter(s), but it is always behaves sequentially from start to finish.
> > > That is what currying *is*.
>
> > Ah, I thought currying / uncurrying what the term reserved for this
> > operation (as I remember from Haskell) that changes the arity of functions (
> > transforming and untransforming a function of n parameters into a function
> > of a tuple of n elements) ?
>
> > > You can easily partially apply to other arguments by doing this: #(fred %1
> > > some-arg %2 other-arg).
>
> > > "partial" could not easily support "unapplying" it.
>
> > > On Thu, Feb 26, 2009 at 10:24 AM, Anand Patil <
> > > anand.prabhakar.pa...@gmail.com> wrote:
>
> > >> Hi all,
>
> > >> I could use a version of 'partial' that would allow me to:
>
> > >> - Partially apply a function to any of its arguments, not just the
> > >> first one
> > >> - 'Unapply' a partially-applied function from one of its arguments.
>
> > >> Is any such thing already available?
>
> > >> Thanks,
> > >> Anand
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---