Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Generalized Algebraic Data Types: A Primer. Parent comment
On a similar note i find the OCaml syntax easier to read than Reason's. (There is an option to toggle between the two in the linked website)
The example from your post in OCaml:
type 'a restricted_maybe = | JustInt : int -> int restricted_maybe | JustString : string -> string restricted_maybe | Nothing : 'a restricted_maybe
On a similar note i find the OCaml syntax easier to read than Reason's. (There is an option to toggle between the two in the linked website)
The example from your post in OCaml: