definitionmoduleStdTuple// ****************************************************************************************// Concurrent Clean Standard Library Module Version 2.0// Copyright 1998 University of Nijmegen// ****************************************************************************************importStdClass// fst :: !(!.a,.b) -> .a // t1 of (t1,t2)fsttuple:==t1where(t1,_)=tuple// snd :: !(.a,!.b) -> .b // t2 of (t1,t2)sndtuple:==t2where(_,t2)=tuple// fst3 :: !(!.a,.b,.c) -> .a // t1 of (t1,t2,t3)fst3tuple:==t1where(t1,_,_)=tuple// snd3 :: !(.a,!.b,.c) -> .b // t2 of (t1,t2,t3)snd3tuple:==t2where(_,t2,_)=tuple// thd3 :: !(.a,.b,!.c) -> .c // t3 of (t1,t2,t3)thd3tuple:==t3where(_,_,t3)=tupleinstance==(a,b)|Eqa&Eqbinstance==(a,b,c)|Eqa&Eqb&Eqcinstance<(a,b)|Orda&Ordbinstance<(a,b,c)|Orda&Ordb&Ordcapp2::!(.(.a->.b),.(.c->.d))!(.a,.c)->(.b,.d)// app2 (f,g) (a,b) = (f a,g b)app3::!(.(.a->.b),.(.c->.d),.(.e->.f))!(.a,.c,.e)->(.b,.d,.f)// app3 (f,g,h) (a,b,c) = (f a,g b,h c)curry::!.((.a,.b)->.c).a.b->.c// curry f a b = f (a,b)uncurry::!.(.a->.(.b->.c))!(.a,.b)->.c// uncurry f (a,b) = f a b