|
|
|
|
|
by dan-robertson
2050 days ago
|
|
Module signatures may contain types. So you can write a signature like: module type VectorSpace = sig
module Field : Field
type t
val zero : t
val (+) : t * t -> t
val (*) : Field.t * t -> t
end
In OOP it becomes hard to write an interface like this simple example, and more complex examples become harder still. |
|