Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 12 lines (8 sloc) 0.199 kb
3e3fe620 »
2012-12-20 Lots of changes, including four next scripts!
1 sub collatz-length(Int $start) {
cf0a7e53 »
2012-12-20 Add scripts, rename scripts, fix glitches in scripts.
2 +($start, { $_ %% 2 ?? $_ div 2 !! 3 * $_ + 1 } ... 1);
3e3fe620 »
2012-12-20 Lots of changes, including four next scripts!
3 }
4
5 sub MAIN(*@numbers) {
6 for @numbers -> $n {
7 say "$n: " ~ collatz-length($n.Int);
8 }
9 }
10
11
Something went wrong with that request. Please try again.