I do have a list in Haskell with the coordinates of some points, like:
[[5.8,2.7,4.1,1.0],[6.2,2.2,4.5,1.5],[5.6,2.5,3.9,1.1]]
Already made a "Point" datatype
data Point = Point {
pointSelf :: Int,
coordinates:: [Float]
} deriving (Show)
I would like to make that list [[Float]] to become a list of [Point], with the attribute "pointSelf" being his index, how should I make it?
I am kinda new at Haskell and functional programming...