Jos� Romildo Malaquias wrote: > ... > My attempt was > > mapIOArray :: Ix ix => (a -> b) -> IOArray ix a -> IO (IOArray ix b) > mapIOArray f v = do w <- newIOArray bounds ???????????? > mapping w (range bounds) > where > bounds = boundsIOArray v > mapping w (i:is) = do x <- readIOArray v i > writeIOArray w i (f x) > mapping w is > mapping w [] = return w > > But I do not know what to use to replace the ????????????. Is there > a polymorphic value in Haskell that can be of any type? >
Yes, use "undefined" from the Prelude: undefined :: a undefined | False = undefined - Mark _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
