People,
I define, for example, 
  tuple42    (_, y, _, _)   = y,
  setTuple42 (x, _, z, u) y = (x, y, z, u),
  mapTuple42 f (x, y, z, u) = (x, f y, z, u).

But it looks natural to have such functions for tuples in the library.
As Haskell-2010 has  zip3, zip4 ...,  where are the library functions
tupleij, setTupleij, mapTupleij,  say, for  i, j <- [2 .. 6]
?
I expected to find in the Report "Data.Tuple" similar as "Data.List",
but do not.
GHC has "Data.Tuple", but it misses the above functions.

Thank you in advance for your comments,

-----------------
Serge Mechveliani
mech...@botik.ru






_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
  • lib for tuples Serge D. Mechveliani

Reply via email to