unique multi-dimensional arrays in Clean

Arthur Gold agold@bga.com
Tue, 5 Nov 1996 00:26:15 -0600


Fellow functional paradigmists:

Is there a 'nice' way to implement multi-dimensional arrays in Clean?

Obviously something like:

::Row a :== *{#a}
::Matrix a :== *{Row a}
::Coord :== (Int,Int)

could be used as type synonyms, but because of the uniqueness, functions like

GetM::Coord *(Matrix a)->(a, *Matrix a) | ArrayElem a

and

PutM::Coord a *(Matrix a)->*(Matrix a)

become somewhat ugly....

Any suggestions are welcome!!

Thanks to all.
--Artie



   Arthur Gold                           Austin, Texas
 -------------------------------------------------------
| agold@bga.com  agold@cs.utexas.edu  ArtieGold@aol.com |
 -------------------------------------------------------
"If not now, when?"