ListArray and function

ListArray and function

Post by kheirandis » Fri, 13 Jul 2007 17:31:37


Hi plz help me
I have a listArray..EX: i=listArray (1,5) [1..5]
How can I pass it to function.?.what declaration of function
For Ex: Cost:: listArray Int Int ->int
I have wrote above declaration but it doesn't work...
Is there any thing must be imported??or declare
 
 
 

ListArray and function

Post by kheirandis » Fri, 13 Jul 2007 19:16:00

how can i pass listArray as argument to function??what declaration for
function ?
i=listArray (1,5) [1..5]

i want to pass i to e function (EX:cost)..how can we declare this
function??
cost::listArray Int Int ->int ??? //it makes error..
what??plz help.. :(

 
 
 

ListArray and function

Post by Mark.Carro » Sat, 14 Jul 2007 01:15:04


XXXX@XXXXX.COM writes:


does, cost :: Array Int Int -> Int
work?

-- Mark