if you have an array of daily sales, you can each_cons over it:
http://stdlib.rubyonrails.org/libdoc/enumerator/rdoc/index.html
if you have an array of daily sales, you can each_cons over it:
http://stdlib.rubyonrails.org/libdoc/enumerator/rdoc/index.html