structure Queue1:QueueSig = struct exception Deq type Item = int abstype Queue = Q of Item list with val empty = Q [] fun isEmpty (Q []) = true | isEmpty _ = false fun enq(Q q, e) = Q(q @ [e]) fun deq(Q (h :: t)) = (Q t, h) | deq _ = raise Deq end end;