->

From, Limit = 0 ..

Ask 'Start from: ' From
Ask 'Repeat to: ' Limit

Do Say i [ i, IS_PRIME ]
Where i = From to Limit

Exit

IsPrime : -a ->
Arg N : Integer, . : IS_PRIME, - Is_prime = 0 ..
+

 CheckRemainder ->
 Arg Is_prime : ^&Integer,
     N, Counter : Integer

 If N _% Counter then Is_prime = 0; Leave
 Else Iterate

 Return

+

Is_prime = 1 [ N > 1 ]

Do CheckRemainder 'Is_prime' N i
Where i = 2 to N - 1

Return