2 ms·
Unit is a type that has exactly one value, (). It's often used like `void` is used in C-like languages. So this: val y : < get_x : int; set_x : int -> uni
by wtetzner 9y ago
Unit is a type that has exactly one value, (). It's often used like `void` is used in C-like languages.
So this:
val y : < get_x : int; set_x : int -> unit >
means an object that has a get_x method that returns an int, and a set_x method that takes an int and returns unit (void).