<smkl>
when you call stdin2rows (), the first thing that gets evaluated is the next stdin2rows ...
<pattern>
ah
<pattern>
so i should bind the value of read_line first?
<smkl>
yes
<pattern>
cool
<pattern>
thank you
<pattern>
here is more of a algorithm question more than an ocaml question... i have a list of lists representing rows and columns, each of arbitrary but equal length (a square matrix)...
<pattern>
yes, this obviously calls for using arrays, but i want to use lists and think of a functional way to do this
<pattern>
anyway, here's an example matrix
<pattern>
a,b,c
<pattern>
d,e,f
<pattern>
g,h,i
<pattern>
i want to convert this to:
<pattern>
a,d,g
<pattern>
b,e,h
<pattern>
c,f,i
<pattern>
so that rows become columns
<pattern>
super easy if i use an array
<pattern>
kind of easy with lists too, if i take the nth value of the list to form the columns
<pattern>
but that will be very inefficient
<pattern>
is there a better way?
<pattern>
by "using the nth value of the list" i mean treating the list like an array to build each new "row" (ie. (List.nth row1 0)::(List.nth row2 0)::etc...)
<pattern>
that's easy but obviously inefficient
<pattern>
hopefully there's a more efficient solution, though it'll obviously always be less efficient than just using an array
Kinners has joined #ocaml
The-Fixer has quit ["Goodbye"]
The-Fixer has joined #ocaml
Hipo has quit ["leaving"]
Swynndla has quit ["Leaving"]
buggs^z is now known as buggs
_JusSx_ has joined #ocaml
Kinners has left #ocaml []
wazze has joined #ocaml
wazze has quit [Client Quit]
wazze has joined #ocaml
cjohnson has joined #ocaml
_Lumiere has joined #ocaml
<_Lumiere>
Oh! Ya du Caml ???
Banana has quit ["leaving"]
Banana has joined #ocaml
owll has joined #ocaml
owll has left #ocaml []
cjohnson has quit ["Drawn beyond the lines of reason"]
smkl has quit [orwell.freenode.net irc.freenode.net]
smkl has joined #ocaml
Tachyon76 has joined #ocaml
Herrchen has joined #ocaml
Tachyon76 has quit ["Leaving"]
Nutssh has joined #ocaml
_JusSx_ has quit [Read error: 110 (Connection timed out)]
whee has joined #ocaml
<_Lumiere>
OH ! Caml !!!
<_Lumiere>
Got whee !!
Nutssh has quit ["Client exiting"]
<_Lumiere>
Comm on the ocaml programmers !!!
<Smerdyakov>
What do you want?
_JusSx_ has joined #ocaml
<_Lumiere>
lu' _JusSx_ !!!!!!!
<_Lumiere>
OCaml is the best langage !!!!! .
<Smerdyakov>
Please. No markup.
<_Lumiere>
No Mark Up ???
jdmarshall has joined #ocaml
<_JusSx_>
_Lumiere
<_JusSx_>
whazzup
Etaoin has joined #ocaml
jdmarshall has quit [Remote closed the connection]
jdmarshall has joined #ocaml
whee has quit ["Leaving"]
whee has joined #ocaml
_Lumiere has quit ["Linux c'est le foutoir, mais Micro$of a peur!!!"]
jdmarshall has quit ["ChatZilla 0.9.35 [Mozilla rv:1.5/20031007]"]