From ce3d8fca474c599bd998add14db0e5116d77815b Mon Sep 17 00:00:00 2001 From: Talasan Nicholson Date: Wed, 8 Nov 2017 01:10:39 -0600 Subject: [PATCH] use object init shorthand for prod types --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 225bdfc..47ed822 100644 --- a/readme.md +++ b/readme.md @@ -843,7 +843,7 @@ A **product** type combines types together in a way you're probably more familia ```js // point :: (Number, Number) -> {x: Number, y: Number} -const point = (x, y) => ({x: x, y: y}) +const point = (x, y) => ({ x, y }) ``` 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.