1
#!/usr/bin/env stx --script
2
3
"/
4
"/ a word count script
5
6
|wc|
7
8
wc := 0.
9
[Stdin atEnd] whileFalse:[
10
wc := wc + Stdin nextLine asCollectionOfWords size.
11
].
12
wc printCR.