The first example in the Learning D book, wont compile

Ali fakeemail at example.com
Sun Mar 25 20:45:58 UTC 2018


Hi

The first example in the Learning D book

import core.thread;
import std.stdio;

void main() {
     import std.range: iota, range;
     write("Greeting in, ");
     foreach(num; iota(1, 4).range) {
         writef("%s...", num);
         stdout.flush();
         Thread.sleep(1.seconds);
     }
     writeln();
     writeln("Hello, World");
}


wont compile and give this error

hello.d(5): Error: module `std.range` import range not found

this should be an easy issue to fix, except that googling this 
error doesnt return anything useful


More information about the Digitalmars-d-learn mailing list