20.1.4 CheckWord

procedure CheckWords is used by our demo to check that all words of an input sentence are actually known to the lexicon prior to invoking MakeScript.

<DG: CheckWords>=
proc {CheckWords Ws}
   {ForAll Ws
    proc {$ W}
       if {Dictionary.member Lex.lexicon W} then skip 
       else raise unknown(W) end end 
    end}
end


Denys Duchier, Claire Gardent and Joachim Niehren
Version 1.3.99 (20050412)