Hacker News new | ask | show | jobs
by allknowingfrog 600 days ago
This is a bit of a tangent, but this is how I would actually solve the problem in Ruby:

  #!/usr/bin/env ruby

  require "csv"

  puts CSV.foreach(ARGV[0], headers: true).sum { _1[1].to_f }.round(2)