Skip to content

Instantly share code, notes, and snippets.

@nathankleyn
Created December 30, 2012 12:11
Show Gist options
  • Save nathankleyn/4412553 to your computer and use it in GitHub Desktop.
Save nathankleyn/4412553 to your computer and use it in GitHub Desktop.
Gist #7 For "Functional Programming Techniques With Ruby: Part III"
Prime.lazy.select { |x| x.to_s.include?('3') }.take(20).to_a
Prime.lazy.select { |x| 100.to_s.chars.map(&:to_i).inject(:+) }.take(20).to_a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment