5 CASEQ(<var>,'[<keys1>],<stmt1>,
9 {,'otherwise,<code for no match>})
11 where the first <stmt> that has <var> as a member of the associated
12 <keys> is the one chosen to execute. */
15 sstatus(feature,"gcook caseq")$
18 if length(pairs)<=2 then
19 block([keys:first(pairs),statement:last(pairs)],
20 if keys=otherwise then buildq([var,statement],statement)
21 else buildq([var,keys,statement],if member(var,'keys) then statement))
22 else buildq([var,keys:first(pairs),statement:first(rest(pairs)),
23 pairs:rest(rest(pairs))],
24 if member(var,'keys) then statement else caseq(var,splice(pairs)))$