Module("collection/list/lookup",[Imports([Import("collection/list/common")]),Strategies([SDefNoArgs("lookup",Rec("x",LChoice(CallNoArgs(SVar("Look1")),Seq(CallNoArgs(SVar("Look2")),CallNoArgs(SVar("x")))))),SDef("getfirst",[DefaultVarDec("s")],Rec("x",LChoice(Seq(CallNoArgs(SVar("Hd")),CallNoArgs(SVar("s"))),Seq(CallNoArgs(SVar("Tl")),CallNoArgs(SVar("x")))))),SDefNoArgs("lookup'",Scope(["x","xs"],Seq(Match(NoAnnoList(Tuple([Var("x"),Var("xs")]))),BA(Call(SVar("getfirst"),[Scope(["y"],Seq(Match(NoAnnoList(Tuple([Var("x"),Var("y")]))),Build(Var("y"))))]),Var("xs"))))),SDef("lookup",[DefaultVarDec("keyeq")],Rec("x",LChoice(Call(SVar("Look1'"),[CallNoArgs(SVar("keyeq"))]),Seq(CallNoArgs(SVar("Look2")),CallNoArgs(SVar("x"))))))]),Rules([RDefNoArgs("Look1",RuleNoCond(NoAnnoList(Tuple([Var("x"),NoAnnoList(ListTail([NoAnnoList(Tuple([Var("x"),Var("y")]))],Wld))])),Var("y"))),RDefNoArgs("Look2",RuleNoCond(NoAnnoList(Tuple([Var("x"),NoAnnoList(ListTail([Wld],Var("xs")))])),NoAnnoList(Tuple([Var("x"),Var("xs")])))),RDef("Look1'",[DefaultVarDec("keyeq")],Rule(NoAnnoList(Tuple([Var("x"),NoAnnoList(ListTail([Var("y")],Wld))])),Var("y"),BA(CallNoArgs(SVar("keyeq")),NoAnnoList(Tuple([Var("x"),Var("y")])))))])])
