package pyml

  1. Overview
  2. Docs

Defining a new class type

val init : ?parents:Object.t list -> ?fields:(string * Object.t) list -> ?methods:(string * Object.t) list -> string -> Object.t

init ~parents ~fields ~methods classname Returns a new class type.

  • parameter parents

    list of base classes (default: []).

  • parameter fields

    associative list for field values (default : []).

  • parameter methods

    associative list for method closures (default : []).

OCaml

Innovation. Community. Security.