902_word_count

namespace word.count;

type LineStat = tuple<int32 lines, int32 words>;

int32 countWords(rstring line) {
	return size(tokenize(line, " \t", false));
	
} // End of function countWords

void addStat(mutable LineStat x, LineStat y) {
	x.lines += y.lines;
	x.words += y.words;
} // End of function addStat