!7 sclass Expectation { } sclass Word { S text; // or null if unknown Word prev, next; new Set expectations; } p-exp { S sentence = "In the movies Dracula always wears a cape"; L rawWords = printStruct(words(sentence)); new L words; for (S w : rawWords) words.add(nu(eqic(w, "the") ? The : Word, text := w)); for (int i = 0; i < l(words)-1; i++) linkWords(words.get(i), words.get(i+1)); printStruct(first(words)); } svoid linkWords(Word a, Word b) { a.next = b; b.prev = a; }