type 'a queue = Q of 'a list * 'a list ;; let empty = Q([],[]) ;; let is_empty q = (q = empty) ;; let add q a = if is_empty q then Q([a],[]) else match q with Q(l1,l2) -> Q(l1,l2@[a]);; exception Empty;; let peek q = if is_empty q then failwith "????" else match q with Q([],h::t) -> h | Q(h::t,l2) -> h;; let pop q = if is_empty q then failwith "????" else match q with Q([],h::t) -> Q([],t) | Q(h::t,l2) -> Q(t,l2);; let map f q = match q with