summaryrefslogtreecommitdiff
path: root/moving-sum
blob: 697f47f95329d0e946612e43f927f410e7b28948 (plain)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env ruby

require 'zipf'

sum = 0.0
ReadFile.readlines_strip(ARGV[0]).each { |i|
  sum += i.to_f
  puts sum
}