mikeX has quit [Read error: 110 (Connection timed out)]
slipstream has joined #ocaml
mikeX has joined #ocaml
slipstream-- has quit [Connection timed out]
mikeX has quit [Remote closed the connection]
mikeX has joined #ocaml
khaladan has joined #ocaml
kral has quit ["Live fast, die young."]
cyyoung has joined #ocaml
Bigbang is now known as Bigb[a]ng
Purice has joined #ocaml
WhatTheDeuce has joined #ocaml
smimou has quit ["bli"]
WhatTheDeuce has left #ocaml []
zedrdave has joined #ocaml
<zedrdave>
hello
Purice has quit [Remote closed the connection]
CosmicRay has joined #ocaml
* zedrdave
has a question about arrays
<mikeX>
zedrdave should just ask his question :)
<zedrdave>
I'm a bit offput by the fact there is no easy way I can see to create an array with separate physical values...
<zedrdave>
e.g.
<zedrdave>
say I want an array of arrays...
<zedrdave>
with each sub_array returned by a function
<zedrdave>
now if I call Array.make 100 [||] and then iterate through the array...
<zedrdave>
all I get is an array that contains 100 times my last call...
<zedrdave>
this due to the fact all elements are physically the same when make is called..
<zedrdave>
how am I supposed to work around that? :/
<mikeX>
I'm not sure I understand
<zedrdave>
hmn, neither am I :)
<zedrdave>
but basically, I don't see an easy way to create a nested array...
<zedrdave>
or more exactly: to initialize it...
<zedrdave>
calling Array.create_matrix is nice, except I can't seem to initialize each element, without having them all be modified (which I understand is caused by them all being the same physical element)
<zedrdave>
or is there a way to initialize an array without using make?
<mikeX>
hmm, you could build lists, and then turn them into arrays
<zedrdave>
yea...
<zedrdave>
but would that be the "recommended" way?
<mikeX>
don't know :)
<zedrdave>
k...
<zedrdave>
lists isn't too much of an option, since I'm really manipulating lotsa levels of lists...