I have the following code that converts input like

blah, blub, gobble, dygook

to string[]

auto f = File("file.txt", "r");
auto words = f.byLine
                 .map!(
                   a => a.to!(string)
                         .splitter(", ")
                         .filter!(a => a.length)
                   )
                   .copy(appender!(string[])).data;

I'm sure there is room for improvement.

D is pretty cool in this way. Once you get used to this kind of code, you're spoiled forever.

Reply via email to