4.3BSD/usr/contrib/icon/book/12/words3.icn

procedure words()
   local wchar, line, word
   wchar := &lcase ++ &ucase ++ '\'-'
   while line := read() do
      line ? while tab(upto(wchar)) do {
         word := tab(many(wchar))
         suspend word
         }
end