Skip to content

Instantly share code, notes, and snippets.

@vastus
Created March 17, 2015 16:37
Show Gist options
  • Select an option

  • Save vastus/4f44f6e6bebd7edee33c to your computer and use it in GitHub Desktop.

Select an option

Save vastus/4f44f6e6bebd7edee33c to your computer and use it in GitHub Desktop.
simple = -> (s) { puts s.chars.join(" ").upcase, s.chars[1..-1].join("\n").upcase }
overcomplicate = -> (s) { [[s.chars.map{|c| c + ' '}.join], s.chars[1..-1]].each { |s| puts s.join("\n").upcase } }
simple["sire"]
overcomplicate["sire"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment