why does this error out?

steven kladitis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Nov 10 06:25:16 PST 2015


On Tuesday, 10 November 2015 at 05:14:29 UTC, lobo wrote:
> On Tuesday, 10 November 2015 at 04:34:22 UTC, Cauterite wrote:
>> Here's the output I get (DMD v2.068.2):
>>
>> [1, 3, 10, 12, 21, 30, 100, 102, 111, 120, 201, 210]
>> core.exception.AssertError at std\range\package.d(4603): 
>> Assertion failure
>
> iota.front() is complaining the range is empty from this line.
>
>     harshads.filter!(h => h > 1000).front.writeln;
>
> your hardas has no values > 1000 so the filter is empty. 
> hardwas was seeded with iota(1,256), so the maximum value will 
> be 252.
>
> bye,
> lobo


with dmd 2.069
I always get
--> [1
and then the error no matter what I canhe that line to.


More information about the Digitalmars-d-learn mailing list