Primality by trial division: Difference between revisions

Content added Content deleted
(→‎{{header|PL/0}}: Added a solution.)
Line 2,854:
{{works with|langur|0.11}}
<syntaxhighlight lang="langur">val .isPrime = f .i == 2 or
.i > 2 and not any f(.x) .i div .x, pseries 2 to.. .i ^/ 2
 
writeln filter .isPrime, series 100</syntaxhighlight>
Line 2,860:
{{out}}
<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|Lingo}}==