The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Curry Code Spice

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Trans Onoma

Posts: 63
Nickname: transfire
Registered: Aug, 2005

Trans Onoma has programming for too long.
Curry Code Spice Posted: Aug 6, 2005 4:34 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Trans Onoma.
Original Post: Curry Code Spice
Feed Title: TRANSONOMA
Feed URL: http://feeds.feedburner.com/transonoma
Feed Description: A Light Green Agile Programming and SciTech Blog
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Trans Onoma
Latest Posts From TRANSONOMA

Advertisement
I see no good reason Ruby can't nor shouldn't support currying like this:



def f(x,y)
x + y
end

g = f(1) #=> lambda { |y| 1 + y }

g(2) #=> 3


So very elegant. Ruby just has to get this lambda/method/block unification thing worked out so these kinds of things are possible.

Read: Curry Code Spice

Topic: Introduction to Ruby, in French Previous Topic   Next Topic Topic: Amazing video

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use