I've to make a function that transforms an House to an NHouse.
data House = House { hworking :: Working, hfinished :: Finished}
type Working = [Roof] , type Finished = [Roof]
data NHouse = NHouse {rot :: [NRoof]}
data NRoof = NRoof {h :: Roof, st :: Status }
data Status = Working | Finished
I've thought of doing it making an auxiliary function that transforms each Roof in an NRoof and then aply that to every Roof in the House.
But I just can't figure it out. I'm doing something like this:
nWorking :: Roof -> NRoof
nWorking x = NRoof {x, Working }