Andre W B Furtado writes:
 :
 | Of course, it is possible to do something like
 | 
 | > update :: MyType -> Int -> MyType
 | > update mt newValue = MT {x = newValue, y = oldValue}
 | >     where oldValue = y mt
 | 
 | but this really annoys me when MyType has too many fields. Suggestions?

update mt newValue = mt {x = newValue}

HTH.
Tom
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to