[MLton] A variation of functional record update notation

Matthew Fluet fluet@cs.cornell.edu
Mon, 8 Aug 2005 10:32:35 -0400 (EDT)


> Above, `set' refers to the update function. The syntax is fairly readable
> even when the update function is referred to by a longvid:
> 
>    record >| R.set#field1 value1
>           >| R.set#field2 value2
>           ...
>           >| R.set#fieldN valueN
> 
> This way there is no need to define a separate infix operator for functional
> record update.

Perhaps more importantly, one would need a separate infix operator for
each record type.  You still need a separate R.set function for each
record type, but the infix pipe operator stays the same.