!7 static JTextArea ta; p-substance { ta = showText(""); onChangeAndNow(ta, r { S w = firstWord(getText(ta)); /* w is the first word in x. Is x a letter (1) or a program (2)? */ S riddle = quote(w) + " is the first word in x. Is x a letter (1) or a program (2)?"; L l = splitIntoSentences(riddle); psl(l); for (S line : l) { print(line + " => " + englishToConceptLanguage(line)); } }); } sS firstWord(S s) { if (empty(s)) ret ""; if (isLetterOrDigit(first(s))) ret takeCharsWhile(s, f isLetterOrDigit); else ret "" + first(s); }