STUArrays for Pairs

Hal Daume III hdaume@ISI.EDU
Tue, 30 Jul 2002 14:34:04 -0700 (PDT)


it seems to me that if you have

  instance MArray (STUArray s) a (ST s)

and

  instance MArray (STUArray s) b (ST s)

you should be able to have

  instance MArray (STUArray s) (a,b) (ST s)

by simply keeping two arrays with identical bounds, one holding as and one
holding bs, and then when you lookup, you lookup in each individually and
pair.

i'd like to write such an instance, but have no idea where to start...any
pointers?

 - Hal

--
Hal Daume III

 "Computer science is no more about computers    | hdaume@isi.edu
  than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume