Why I chose D over Ada and Eiffel

deadalnix deadalnix at gmail.com
Fri Aug 30 02:14:23 PDT 2013


On Friday, 30 August 2013 at 08:10:24 UTC, Timon Gehr wrote:
> On 08/30/2013 01:35 AM, Timon Gehr wrote:
>>
>> bool isPrime(int x){ return iota(3,x).all!(a=>!!(x%a)); }
>
> bool isPrime(int x){ return 1<x && iota(3,x).all!(a=>!!(x%a)); }

iota(3, to!int(sqrt(x)))


More information about the Digitalmars-d mailing list