Prime number

Greatsam4sure greatsam4sure at gmail.com
Thu Aug 2 08:30:05 UTC 2018


I know D is very powerful from my little experience. What is the 
idiomatic way to get prime numbers say from 1-30 without using 
loops(outer and inner loop). Can map, filter, fold etc in 
algorithm be use.  Pls show some code with chain call.

I can easily achieve even numberd and odd numbers using filter. 
But prime numbers I have to use 2loops.

I will appreciate any help,just a newbie in D


More information about the Digitalmars-d-learn mailing list