Skip to content

Instantly share code, notes, and snippets.

@Gbury
Created November 14, 2016 22:59
Show Gist options
  • Save Gbury/4556073c83d6693d9341c9cdf62db06b to your computer and use it in GitHub Desktop.
Save Gbury/4556073c83d6693d9341c9cdf62db06b to your computer and use it in GitHub Desktop.
module M : sig
type t = private int
val make : int -> t
end = struct
type t = int
let make i =
if i mod 2 = 0 then i
else raise (Invalid_argument "not an even number !")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment