Hackerrank Lazy Evaluation Solution
Lazy evaluation is an evaluation strategy that delays the assessment of an expression until its value is needed.
Ruby introduced a lazy enumeration feature. Lazy evaluation increases performance by avoiding needless calculations, and it has the ability to create potentially infinite data structures.
Example:
power_array = -> (power, array_