Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ocaml modules
module State = struct
type t = int
let inc (n: t) = Transformer.inc n
end
;;
module Transformer = struct
let inc (n: State.t) = n + 1
end
;;
let num: State.t = 1 in
let b = State.inc num
;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.