Currying is when you write a function in such a way as it can be
partially applied, so in languages like haskell, it "curries" all
functions by default then (and I guess for other ML derivatives??).

On May 16, 9:40 am, Andres Almiray <[email protected]> wrote:
> Yes, Scala supports a terser syntax for currying as you have shown,
> but you're missing Robert's point: OCaml (as well as other languages
> like Groovy) support currying any function, regardless of how it was
> defined. In the case of the Scala option you depicted
> _you_have_to_know_ in advance you'd like to curry that function.
>
> So, while other languages support curry "on the go" not so in Scala,
> you have to take a moment to think what you want to accomplish, which
> is *not* a bad idea to start with.
>
> On May 15, 2:45 am, Viktor Klang <[email protected]> wrote:
>
> > Sorry man, seems that you've basically misinformed.
>
> > Define a top-level function:
>
> > object f extends ((Int) => Int) { def apply(x:Int) = x + 1 }
>
> > Currying:
>
> > def f(x:Int)(y:Int) = x + y
>
> > On Fri, May 15, 2009 at 2:35 AM, Robert Fischer <
>
> > [email protected]> wrote:
>
> > > If Dick is going to keep going on about how functional and mathematical
> > > Scala is, and how that's so
> > > great, maybe he should check out OCaml/F#?
>
> > > I've just posted to my blog about how Scala is *not* a functional 
> > > language.
> > >  Which is not to say
> > > it's a bad language -- it's just not a functional language.
>
> > >http://enfranchisedmind.com/blog/posts/scala-not-functional/
>
> > > ~~ Robert Fischer.
> > > Grails Training        http://GroovyMag.com/training
> > > Smokejumper Consultinghttp://SmokejumperIT.com
> > > Enfranchised Mind Bloghttp://EnfranchisedMind.com/blog
>
> > > Check out my book, "Grails Persistence with GORM and GSQL"!
> > >http://www.smokejumperit.com/redirect.html
>
> > --
> > Viktor Klang
> > Rockstar Developer
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to