let yes_no msg = match ask msg with | `yes | `no as x -> x | `abort -> exit 0 let () = match yes_no "Automatic?" with | `yes -> automatic () | `no -> manual ()