Created
April 29, 2014 02:25
-
-
Save shinokada/11389349 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# read text from file, map to integer and sum all | |
File.new(file_name, 'r').each_line.map(&:strip).map(&:to_i).inject(:+) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment