12345678910111213141516171819202122232425262728293031323334(**************************************************************************)(* *)(* OCaml *)(* *)(* The OCaml programmers *)(* *)(* Copyright 2024 Institut National de Recherche en Informatique et *)(* en Automatique. *)(* *)(* All rights reserved. This file is distributed under the terms of *)(* the GNU Lesser General Public License version 2.1, with the *)(* special exception on linking described in the file LICENSE. *)(* *)(**************************************************************************)type('a,'b)t='a*'bletmakeab=(a,b)letfst(a,_)=aletsnd(_,b)=bletswap(a,b)=(b,a)letfoldf(a,b)=fabletmapfg(a,b)=(fa,gb)letiterfg(a,b)=fa;gbletmap_fstf(a,b)=(fa,b)letmap_sndg(a,b)=(a,gb)letequaleqaeqb(a,b)(a',b')=eqaaa'&&eqbbb'letcomparecmpacmpb(a,b)(a',b')=letc=cmpaaa'inifc<>0thencelsecmpbbb'