HI Pratik, "Curry is to Function as Instantiate is to Class" Currying is a technique which transforms the method with multiple arguments into a method with single arguments. The single argument method retuns a "method" which again takes a argument.
def add(x:Int, y:Int) = x + y add(1, 2) // 3 add(7, 3) // 10 And after currying: def add(x:Int) = (y:Int) => x + y add(1)(2) // 3 add(7)(3) // 10 Use:The best use of Currying can be that it can be used for defining generalized functions and later users can specialise them according to their needs. Thanks, RajkumarGoel. ________________________________ From: Pratik Anand <[email protected]> To: Twincling Group <[email protected]> Sent: Thursday, 11 June, 2009 10:07:07 PM Subject: [twincling] SCALA: currying Hello. Can anyone throw some light on why & how 'currying' is helpful in Scala? -- Thanks, Pratik K Anand [Non-text portions of this message have been removed] ------------------------------------ IRC #twincling on irc.freenode.net Yahoo! Groups Links Bollywood news, movie reviews, film trailers and more! Go to http://in.movies.yahoo.com/ [Non-text portions of this message have been removed]

