function U( opr:symbol; v:Value ):Value; { U :Value -> Value } begin case opr of minus: if v^.tag=intval then U:=mkint(-v^.n) else error('- non int '); notsy: if v^.tag=boolval then U:=mkbool(not v^.b) else error('not ~bool '); hdsy: if v^.tag=listval then U:=v^.hd else error('hd ~list '); tlsy: if v^.tag=listval then U:=v^.tl else error('tl ~list '); nullsy:if v^.tag=listval then U:=mkbool(false) else if v^.tag=nilval then U:=mkbool(true) else error('null ~list') end end {U}; {\fB Execute Unary Operators \fP}