12345678910111213141516171819202122232425openTypesopenTopletnew_envdict={Env.dict=dict;op=Anagram;vars=Vars.empty}(* Override the active operation when an explicit unary command is entered *)letop_of_exprenvexpr=matchexprwith|Expr(Fun(o,_))->beginmatchowith|Anagram|Pattern|Build->o|_->env.Env.opend|Command(Fn_)->env.Env.op|Commando->o|_->env.Env.opletprompt_of_op=function|Anagram->"anagram > "|Multi->"multi > "|Pattern->"pattern > "|Build->"build > "|Fns->s^" > "|_->"other > "