Logo

Programming-Idioms

History of Idiom 5 > diff from v14 to v15

Edit summary for version 15 by :

Version 14

2015-09-02, 15:30:40

Version 15

2015-09-02, 15:30:52

Idiom #5 Create a 2D Point data structure

Declare a container type for two floating-point numbers x and y

Idiom #5 Create a 2D Point data structure

Declare a container type for two floating-point numbers x and y

Code
data Point = Point 
  { x :: Double
  ,  y :: Double 
  }
Code
data Point = Point 
  { x :: Double
  , y :: Double 
  }