MkPairElt
functorfunctor MkPairElt (
structure EltA :
ELEMENT
structure EltB :
ELEMENT
sharing EltA.Hashing = EltB.Hashing
):
ELEMENT
where type t = EltA.t * EltB.t =
MkPairElt
Cost SpecificationWork | Span | |
equal ((A1,A2),(B1,B2))
|
O(Wequal(A1,B1)+Wequal(A2,B2)) | O(max(Sequal(A1,B1),Sequal(A2,B2))) |
compare ((A1,A2),(B1,B2)) |
O(Wcompare(A1,B1)+Wcompare(A2,B2)) | O(max(Scompare(A1,B1),Scompare(A2,B2))) |
hash (A1,A2) |
O(Whash(A1)+Whash(A2)) | O(Shash(A1)+Shash(A2)) |
toString (A1,A2) |
O(WtoString(A1)+WtoString(A2)) | O(max(StoString(A1),StoString(A2))) |