1\DOC delta 2 3\TYPE {type 'a delta} 4 5\SYNOPSIS 6A type used for telling when a function has changed its argument. 7 8\DESCRIBE 9The {delta} type is declared as follows: 10{ 11 datatype 'a delta = SAME | DIFF of 'a 12} 13The {delta} type may be used in applications where it is 14important to tell if a function has changed its argument or not. As an 15example of this, consider mapping a function over a large collection of 16elements. If only a few elements are changed, it makes sense to re-use 17all those that were not changed. This can of course be handled on an 18ad hoc basis; the {delta} type provides a mechanism for doing this 19systematically. 20 21\COMMENTS 22The {delta} type is an example of polytypism. 23 24\SEEALSO 25Lib.delta_apply, Lib.delta_map, Lib.delta_pair. 26\ENDDOC 27