mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 15:43:58 +00:00
One more fix in the OCaml tutorial.
This commit is contained in:
parent
9f3bff9ce8
commit
b2cf2228b3
@ -217,7 +217,7 @@ type number = Int of int | Float of float ;;
|
|||||||
type point2d = Point of float * float ;;
|
type point2d = Point of float * float ;;
|
||||||
let my_point = Point (2.0, 3.0) ;;
|
let my_point = Point (2.0, 3.0) ;;
|
||||||
|
|
||||||
(* Types can be parametrized, like in this type for "list of lists
|
(* Types can be parameterized, like in this type for "list of lists
|
||||||
of anything". 'a can be substituted with any type. *)
|
of anything". 'a can be substituted with any type. *)
|
||||||
type 'a list_of_lists = 'a list list ;;
|
type 'a list_of_lists = 'a list list ;;
|
||||||
type int_list_list = int list_of_lists ;;
|
type int_list_list = int list_of_lists ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user