generate doclist automatically based on modelist

This commit is contained in:
nightwing 2013-09-07 19:13:30 +04:00
commit 37fc612756
17 changed files with 118 additions and 94 deletions

View file

@ -0,0 +1,14 @@
#!/usr/bin/env rdmd
// Computes average line length for standard input.
import std.stdio;
void main() {
ulong lines = 0;
double sumLength = 0;
foreach (line; stdin.byLine()) {
++lines;
sumLength += line.length;
}
writeln("Average line length: ",
lines ? sumLength / lines : 0);
}