Anonymous user
Fibonacci n-step number sequences: Difference between revisions
→{{header|Perl 6}}: edit for style
(→{{header|Perl 6}}: add entry) |
(→{{header|Perl 6}}: edit for style) |
||
Line 237:
=={{header|Perl 6}}==
<lang perl6>sub
nacci @
}
sub
my &fun = eval join '+', '*' xx @starter;
@starter, &fun ... *;
}
say nacci(2,1)[^20];</lang>
{{out}}
Line 257 ⟶ 260:
1 1 2 4 8 16 32 64 128 256 512 1023 2045 4088 8172 16336 32656 65280 130496 260864
2 1 3 4 7 11 18 29 47 76 123 199 322 521 843 1364 2207 3571 5778 9349</pre>
=={{header|Python}}==
===Python: function returning a function===
|