This is prob an easy question but I just could not find the answer for this:
How can I access the parameters of a custom type?
Lets say my code is like this: (anotherFunc is only there to help me access the parameter)
data Shape = (Shape Color [Dimension])
func :: [Shape] -> [Shape]
func (x:xs) = anotherFunc x : func xs
anotherFunc :: [Shape] -> [Shape]
anotherFunc (Shape Color (x:xs)) = <some simple operations>
is there something similar to this??
func ( (Shape Color (x:xs)):shapes )
many thx!!