Skip to content

Instantly share code, notes, and snippets.

@ruprict
Created March 21, 2012 00:47
Show Gist options
  • Save ruprict/2143151 to your computer and use it in GitHub Desktop.
Save ruprict/2143151 to your computer and use it in GitHub Desktop.
Kleyn: FP II
words = ["foo", "bar", "baz", "pibb"]
words.map do |word|
"mr " + word
end # => ["mr foo", "mr bar", "mr baz", "mr pibb"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment