Fractran: Difference between revisions

Content added Content deleted
Line 2,589: Line 2,589:
join(Iterators.take(primes, 30), ' '), "\n")
join(Iterators.take(primes, 30), ' '), "\n")


println("First $(primes.n) primes:")
println("Watch the first $(primes.n) primes dropping out:")
@show primes;</syntaxhighlight>
primes</syntaxhighlight>
{{output}}
{{output}}
<pre>First 30 iterations of FRACTRAN program 'primes':
<pre>First 30 iterations of FRACTRAN program 'primes':
2 15 825 725 1925 2275 425 390 330 290 770 910 170 156 132 116 308 364 68 4 30 225 12375 10875 28875 25375 67375 79625 14875 13650 2550
2 15 825 725 1925 2275 425 390 330 290 770 910 170 156 132 116 308 364 68 4 30 225 12375 10875 28875 25375 67375 79625 14875 13650 2550


First 25 primes:
Watch the first 25 primes dropping out:
primes = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97</pre>
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97</pre>


=={{header|Kotlin}}==
=={{header|Kotlin}}==