John-Li/my_programs — comment on commit b6b9bf8795982ef0e911dbc2acb6e9f6d7c023aa
File: book/arrays/1_dimentional/task-1.rb line 2
By gmile:

Although generally it is good to write one-liners, you should not do that here. You're being calculating same things twice, that's not ok. Why not? Imagine you have an array of one billion billions items, where `array.max` takes some time. Your code will take twice as much time as it should.