First 9 prime Fibonacci number: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (→{{header|Raku}}: Add a Raku example) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: slightly nicer layout) |
||
Line 6: | Line 6: | ||
=={{header|Raku}}== |
=={{header|Raku}}== |
||
<lang perl6>put ++$ |
<lang perl6>put ++$ .fmt("%2d: ") ~ $_ for (0, 1, * + * … *).grep( &is-prime )[^20];</lang> |
||
{{out}} |
{{out}} |
||
<pre>1: 2 |
<pre> 1: 2 |
||
2: 3 |
2: 3 |
||
3: 5 |
3: 5 |
||
4: 13 |
4: 13 |
||
5: 89 |
5: 89 |
||
6: 233 |
6: 233 |
||
7: 1597 |
7: 1597 |
||
8: 28657 |
8: 28657 |
||
9: 514229 |
9: 514229 |
||
10: 433494437 |
10: 433494437 |
||
11: 2971215073 |
11: 2971215073 |