Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Charles OCaml
class Show a where
    show :: a -> String

instance Show Int where
    show = ... -- provided by default

show 1 
module type SHOW = sig
  type t
  val show : t -> string

module ShowInt = struct
  type t = int
  let show = string_of_int
end 1
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.