Hello, café:
I am trying to use more than one array with runSTUArray but I don't seem
to be able to understand how it works. My first try is this:
test1 n = runSTUArray $ do
a - newArray (1, n) (2::Int)
b - newArray (1, n) (3::Int)
forM_ [1..n] $ \i - do
On Thursday 15 March 2012, 19:27:18, Juan Miguel Vilar wrote:
Hello, café:
I am trying to use more than one array with runSTUArray but I don't seem
to be able to understand how it works. My first try is this:
test1 n = runSTUArray $ do
a - newArray (1, n) (2::Int)
On Thursday, March 15, 2012 at 2:27 PM, Juan Miguel Vilar wrote:
Hello, café:
I am trying to use more than one array with runSTUArray but I don't seem
to be able to understand how it works. My first try is this:
test1 n = runSTUArray $ do
a - newArray (1, n) (2::Int)
b - newArray (1,
On Thursday 15 March 2012, 19:53:56, Daniel Fischer wrote:
On Thursday 15 March 2012, 19:27:18, Juan Miguel Vilar wrote:
Hello, café:
However, when I write
test2 n = runSTUArray $ do
let createArray v n = newArray (1, n) (v::Int)
Here you create a local binding
El 15/03/12 20:07, Daniel Fischer escribió:
On Thursday 15 March 2012, 19:53:56, Daniel Fischer wrote:
On Thursday 15 March 2012, 19:27:18, Juan Miguel Vilar wrote:
Hello, café:
However, when I write
test2 n = runSTUArray $ do
let createArray v n = newArray (1, n)
El 15/03/12 19:53, Anthony Cowley escribió:
On Thursday, March 15, 2012 at 2:27 PM, Juan Miguel Vilar wrote:
Hello, café:
I am trying to use more than one array with runSTUArray but I don't seem
to be able to understand how it works. My first try is this:
test1 n = runSTUArray $ do
a -