aboutsummaryrefslogtreecommitdiff
path: root/source/app.d
blob: b9f68c4775d464feb12e8c260c204247557907e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import std.conv      : to;
import std.string    : split;
import std.range     : dropOne;
import std.algorithm : map, each;
import std.stdio     : stdin, File;

static import machine;

void process(string line) {
	line.split.each!(machine.process);
}

void process(ref File file) {
	file.byLine.map!(to!string).each!process;
}

void main(string[] args) {
	args
		.dropOne
		.map!File
		.each!((File file) => file.process);

	stdin.process;
}