let choose m = try M.iter (fun c i -> raise (Choose (c, i))) m; raise Not_found with Choose (c, i) -> c, i