Hello,

I've just started learning D, working my way through "The D Programming Language" by Andrei Alexandrescu. On page 8 there is:
import std.stdio, std.string;

void main(){
    uint[string] dictionary;
    foreach (line; stdin.byLine()){
        foreach (word; splitter(strip(line))){
            if (word in dictionary) continue;
            auto newID = dictionary.length;
            dictionary[word] = newID;
            writeln(newID, '\t', word);
        }
    }
}

When i try to run it, i get that splitter is 'undefined'. I can't spot the error. Maybe a fresh pair of eyes will do it??

Thank you,
Alex

Reply via email to