Computer Science Canada [O'Caml-tip] This is seriously cool |
Author: | wtd [ Wed Aug 11, 2004 7:11 pm ] | ||||||||
Post subject: | [O'Caml-tip] This is seriously cool | ||||||||
Just piced this one up from comp.lang.functional. Let's say I want to copy a structure, but want to change one member. For starters, the structure describes a point in three-dimensions.
Now I define one point:
Now I want to copy the first point into a second point, but zero the z coordinate. The lengthy (and thus more error-prone) method is:
Instead, how about...
|