Re:Functor, Applicative, and Monad
by TheAsprngHacker on Thursday September 19, 2019 @01:58AM
(#21013677)
The OCaml type 'a * 'b is the equivalent of the Haskell type (a, b). This type is known as the Cartesian product type, and it's written with a multiplication symbol in type theory (hence the asterisk in OCaml syntax).
The product type is the type of pairs. It's definition is
x : A
y : B
--------------
(x, y) : A * B
meaning that if x has type A and y has type B, then (x, y) has type A * B.
The product type is the type of pairs. It's definition is
meaning that if x has type A and y has type B, then (x, y) has type A * B.- Product type on Wikipedia: https://en.wikipedia.org/wiki/Product_type - Product type on the nLab (which is a math-heavy resource): https://ncatlab.org/nlab/show/product+type