misc.ml1 2 3 4 5 6 7 8 9(* gsl-ocaml - OCaml interface to GSL *) (* Copyright (©) 2002-2012 - Olivier Andrieu *) (* Distributed under the terms of the GPL version 3 *) let () = Error.init () let maybe_or_else o def = match o with None -> def | Some v -> v let may vo f = match vo with None -> () | Some v -> f v let may_apply fo v = match fo with None -> () | Some f -> f v let is = function None -> false | Some _ -> true