Functional Programming with Ruby

21,295 views

Published on

This presentation shows how to apply functional programming principles to Ruby. It covers some theoretical principles but also code examples.

Published in: Technology, Education
7 Comments
62 Likes
Statistics
Notes
  • @tokland Aaand I just realized that you have actually used `Hash#[]` and explained why you don't like it on Slide #29 (How in the world did I misread the code?!). Now that I tried out `mash()` in IRB, I fully see your rational and I appreciate the elegance of the solution. Thanks for your reply.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • @ysulaiman I am aware of Hash[...], check my whole rationale here: http://bugs.ruby-lang.org/issues/666#note-6 Basically my point is that Hash[...] breaks OOP flow (we want a method!) and builds an intermediate array (while mash is an enumerable method and performs the key/value transformation on the fly).
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Thanks for sharing this informative presentation.

    Regarding the example of converting an Enumerable (Array) to a Hash on Slide #28, and under Ruby 1.9.2 or higher, why not use the new form of the `Hash#[]` method as in the following gist?
    https://gist.github.com/4453725
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Really funny
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • nice.. thx
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
21,295
On SlideShare
0
From Embeds
0
Number of Embeds
406
Actions
Shares
0
Downloads
281
Comments
7
Likes
62
Embeds 0
No embeds

No notes for slide

×