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

31 Jul
2012
31 Jul
'12
6:53 p.m.
That was it!
On Tue, Jul 31, 2012 at 3:34 PM, Jan-Willem Maessen
On Tue, Jul 31, 2012 at 5:52 PM, KC
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
4675
Age (days ago)
4675
Last active (days ago)
0 comments
1 participants
participants (1)
-
KC