@@ -843,7 +843,7 @@ A **product** type combines types together in a way you're probably more familia
843
843
844
844
```js
845
845
// point :: (Number, Number) -> {x: Number, y: Number}
846
-
constpoint= (x, y) => ({x: x, y: y})
846
+
constpoint= (x, y) => ({ x, y})
847
847
```
848
848
It's called a product because the total possible values of the data structure is the product of the different values. Many languages have a tuple type which is the simplest formulation of a product type.
0 commit comments