Skip to content

Instantly share code, notes, and snippets.

@deepthawtz
Created March 31, 2009 09:24
Show Gist options
  • Select an option

  • Save deepthawtz/88125 to your computer and use it in GitHub Desktop.

Select an option

Save deepthawtz/88125 to your computer and use it in GitHub Desktop.
chars = "hullo".tap { |x| puts "original -- #{x.inspect}" }.
each_char.tap { |x| puts "each_char -- #{x.inspect}" }.
each_char.select{|x| x.inspect 'l'}.tap {|x| puts "chained each_char() and select() -- #{x.inspect}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment