langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
9
Task/Executable-library/Perl-6/executable-library-1.pl6
Normal file
9
Task/Executable-library/Perl-6/executable-library-1.pl6
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
module Hailstone {
|
||||
our sub hailstone($n) is export {
|
||||
$n, { $_ %% 2 ?? $_ div 2 !! $_ * 3 + 1 } ... 1
|
||||
}
|
||||
}
|
||||
|
||||
sub MAIN {
|
||||
say "hailstone(27) = {.[^4]} [...] {.[*-4 .. *-1]}" given Hailstone::hailstone 27;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue