briancrocker81 / triangle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

File reader script

This mini script runs through a file, iterating over each line adding the penultimate number to a total figure

Version 1

This script took far too long to write. Its also a nasty mash of arrays.

Version 2

This took al of 20 mins to write but could still be improved. Its slower than the first and I'm not completely onboard with the final result

Version 3

After a discussion with Kevin Hughes who put me onto reduce, this is a smaller, quicker and more concise entry

About


Languages

Language:Ruby 100.0%