1\DOC delta_pair
2
3\BLTYPE
4delta_pair : ('a -> 'a delta) ->
5             ('b -> 'b delta) ->
6             'a * 'b -> ('a * 'b) delta
7\ELTYPE
8
9\SYNOPSIS
10Apply two functions to the projections of a pair, sharing as much
11structure as possible.
12
13\KEYWORDS
14sharing.
15
16\DESCRIBE
17An application {delta_pair f g (x,y)} applies {f} to {x} and {g} to {y}.
18If {f x} equals {g y} equals {SAME}, then {SAME} is returned.
19Otherwise {DIFF (p1,p2)} is returned, where {p1} is {x} if {f x}
20equals {SAME}; otherwise {p1} is {f x}. Similarly, {p2} is {y} if {g y}
21equals {SAME}; otherwise {p2} is {g y}.
22
23\FAILURE
24If {f x} raises {e}, then {delta_pair f g (x,y)} raises {e}.
25
26If {g y} raises {e}, then {delta_pair f g (x,y)} raises {e}.
27
28\EXAMPLE
29See the example in the documentation for {delta_apply}.
30
31\SEEALSO
32Lib.delta, Lib.delta_apply, Lib.delta_pair.
33\ENDDOC
34