apollonin/numphp

Generate array via formula

upsilon-den opened this issue · 2 comments

Can you realize the method, which will generate an array via formula?
The formula will be an arithmetic or geometric progressions.

e.g.
$arr = Generator::viaFormula($from = 1, $to = 10, '2n+1');
2n+1 - formula.

interesting. I'll see what I can do here.

@seredenko is it smth you wanted? look at pr #29