[Haskell-beginners] [Haskell-cafe] The following is supposed to be initializing a 2D array but it doesn't seem to work.

KC kc1956 at gmail.com
Wed Aug 1 00:53:02 CEST 2012


That was it!

On Tue, Jul 31, 2012 at 3:34 PM, Jan-Willem Maessen
<jmaessen at alum.mit.edu>wrote:

>
>
> On Tue, Jul 31, 2012 at 5:52 PM, KC <kc1956 at gmail.com> wrote:
>
>> All I am getting is this:
>>
>> array ((1,5),(1,5)) [((1,5),1.0)]
>>
>> Maybe the behaviour of ghc was changed since the article was written.
>>
>
> I think you've made a common mistake here.  Array bounds are (lower in all
> dimensions, upper in all dimensions).  So perhaps you intended to use the
> bounds ((1,1), (5,5)) in your code?
>
> I make this mistake frequently.
>
> -Jan-Willem Maessen
>



-- 
--
Regards,
KC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120731/ecc9d0c4/attachment.htm>


More information about the Beginners mailing list