[Haskell-beginners] Copy record with mutations?

Andrew n marshall andrew.n.marshall at gmail.com
Wed Apr 13 17:22:14 CEST 2011

Is there a syntax or function to copy a record, but with select fields
populated with new values?

For example, extending LYAH's Car

let stang67 = Car {company="Ford", model="Mustang", year=1967}
let stang68 = stang67 `mutate` Car {year=1968}

such that company and model are "inherited".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110413/96b1a4b5/attachment.htm>

More information about the Beginners mailing list