The F# language does partial application through calling the function: if you
don't supply enough
arguments, they're partially applied. The |> syntax is for "backwards"
(object-y) partial application:
let f x y = ...
let g = f 1
let h = 1 |> f
The |> operator is built-in in F#, but in OCaml
I've been using & and p, respectively.
On Oct 18, 2:21 pm, B Smith-Mannschott wrote:
> On Sun, Oct 18, 2009 at 20:04, Stuart Halloway
>
> wrote:
>
> > I find the suite of ->, ->>, anonymous functions, partial, and comp
> > sufficient for my needs, with each having its place.
>
> > My only grumb
On Sun, Oct 18, 2009 at 20:04, Stuart Halloway
wrote:
>
> I find the suite of ->, ->>, anonymous functions, partial, and comp
> sufficient for my needs, with each having its place.
>
> My only grumble is that "partial" is a lot of characters. I would love
> a one-character alternative, if it coul
I find the suite of ->, ->>, anonymous functions, partial, and comp
sufficient for my needs, with each having its place.
My only grumble is that "partial" is a lot of characters. I would love
a one-character alternative, if it could be reasonably intuitive.
Stu
> On Oct 16, 10:22 pm, Sean D
On Oct 16, 10:22 pm, Sean Devlin wrote:
> In order to generate closures, every function should take parameters
> first, and data at the end, so that they work well with partial.
It's really hard to come up with a consistent practice that works well
for all scenarios. Even clojure.core is incons
Kinda off topic. I didn't realize ->> has been introduced. Is there a
list of new forms that's been
introduced since 1.0?
Thanks
On Sat, Oct 17, 2009 at 9:17 AM, Laurent PETIT wrote:
>
>
> 2009/10/17 James Reeves
>>
>> On Oct 17, 4:55 am, samppi wrote:
>> > Personally, I can go either way—I j
Okay, comp on its own is not comparable to ->, good point. Once you
add partial, I think a more direct comparison is possible.
(let [& comp
p partial
((&
(p filter predicate)
(p map function)
(p remove other-predicate))
some-seq))
This is a lot closer to the new ->>.
Anyw
Hmmm... good point about java interop. Didn't consider that.
On Oct 17, 3:44 am, Timothy Pratley wrote:
> On Oct 17, 1:22 pm, Sean Devlin wrote:
>
> > Given these reasons, I'd like to make a proposal. Contrib should be
> > centered around closures, not ->.
>
> Hi Sean,
>
> -> seems to work nic
Hi.
Am 17.10.2009 um 13:25 schrieb James Reeves:
> Well, defining the "most important argument" can be tricky. However,
> it would be nice if there were map and filter variants that could be
> used with ->.
There is also ->>.
(->> some-seq
(filter predicate)
(map function)
(remove othe
2009/10/17 James Reeves
>
> On Oct 17, 4:55 am, samppi wrote:
> > Personally, I can go either way—I just kind of wish that there was a
> > consistent practice for the placement of the most important argument,
> > whether it's first or last, in both core and contrib.
>
> Well, defining the "most
On Oct 17, 4:55 am, samppi wrote:
> Personally, I can go either way—I just kind of wish that there was a
> consistent practice for the placement of the most important argument,
> whether it's first or last, in both core and contrib.
Well, defining the "most important argument" can be tricky. How
On Oct 17, 3:22 am, Sean Devlin wrote:
> I have an idea in my head, and I can't quite put all the details
> together. The intent with of this posting is to start a healthy
> debate of the merits of -> vs. comp. I know people on this list will
> think of something.
It seems to me you're compari
On Oct 17, 1:22 pm, Sean Devlin wrote:
> Given these reasons, I'd like to make a proposal. Contrib should be
> centered around closures, not ->.
Hi Sean,
-> seems to work nicely for java interop in ways that comp does not. I
think it has its place.
(defn full-screen
"Enables full-screen mo
On Fri, Oct 16, 2009 at 11:55 PM, samppi wrote:
> Don't forget about the third piece of the puzzle, #() (and fn).
> Whenever I need to create a function using ->, I just do #(-> % ...).
> It's about as much typing as (comp ...).
>
> Personally, I can go either way—I just kind of wish that there w
Don't forget about the third piece of the puzzle, #() (and fn).
Whenever I need to create a function using ->, I just do #(-> % ...).
It's about as much typing as (comp ...).
Personally, I can go either way—I just kind of wish that there was a
consistent practice for the placement of the most imp
Thanks for the feedback everyone!
Kev
On Apr 1, 11:38 pm, Rayne wrote:
> comp seems more appropriate here.
>
> On Mar 31, 11:52 pm, kkw wrote:
>
> > Hi folks,
>
> > I have some code where I wanted to:
> > - take a list of stuff (which includes another list inside)
> > - use 'seq-utils/flat
comp seems more appropriate here.
On Mar 31, 11:52 pm, kkw wrote:
> Hi folks,
>
> I have some code where I wanted to:
> - take a list of stuff (which includes another list inside)
> - use 'seq-utils/flatten' to flatten the list
> - use 'interpose' to add comma-delimiting strings between the
While we speak about function composition (or not),
you can also use the partial function creator to obtain "point-free" (no
need for anonymous function with formal argument declaration or use) code:
And with the use of comp, you could define the function without even
explicitly naming any formal
comp creates a new function that you can store.
-> threads a value through a series of expressions.
On Wed, Apr 1, 2009 at 12:52 AM, kkw wrote:
>
> Hi folks,
>
>I have some code where I wanted to:
> - take a list of stuff (which includes another list inside)
> - use 'seq-utils/flatten' to fl
19 matches
Mail list logo