huxley.openprojects.net changed the topic of #ocaml to: www.ocaml.org
jemfinch has quit []
jemfinch has joined #ocaml
jemfinch has quit [Read error: 104 (Connection reset by peer)]
jemfinch` has joined #ocaml
pHa has quit [Read error: 104 (Connection reset by peer)]
pHa has joined #ocaml
gene9 has quit []
comatoast has joined #ocaml
Cryptor has joined #ocaml
GnuVince has left #ocaml []
JGibson_ has quit [carter.openprojects.net irc.openprojects.net]
pHa has quit [carter.openprojects.net irc.openprojects.net]
Taaus has quit [carter.openprojects.net irc.openprojects.net]
comatoast has quit [carter.openprojects.net irc.openprojects.net]
smkl has quit [carter.openprojects.net irc.openprojects.net]
pHa has joined #ocaml
Taaus has joined #ocaml
JGibson_ has joined #ocaml
comatoast has joined #ocaml
smkl has joined #ocaml
Cryptor has quit ["Leaving"]
JGibson__ has joined #ocaml
JGibson_ has quit [Read error: 104 (Connection reset by peer)]
<comatoast>
matching a nonempy list against a :: b will give me the head of the list in a and the rest of the thing in b. Is there a way to get the tail of the list in one 'thing' and the rest of the list in another?
<comatoast>
s/py/pty/
<jemfinch`>
the tail of the list *is* the rest of the list.
<comatoast>
if :: pops the head off the list, I want to pop off the tail of the list
<jemfinch`>
hd :: tl gives you the head in "hd" and the tail in "tl"
<jemfinch`>
there's no other way to decompose a list.
<comatoast>
any reason why?
<comatoast>
(performance, would require too much annoyance to be able to implement efficiently...)
<jemfinch`>
because that's how those lists are implemented.
<jemfinch`>
they're just a pointer to some data, and a pointer to the rest of the list. It's a singly linked list.
<comatoast>
ah
<jemfinch`>
(actually, under the covers there's also a tag.
<comatoast>
why just an slist?
<comatoast>
a doubly-linked list would be really useful...
<jemfinch`>
not especially.
<jemfinch`>
singly linked lists are useful for the vast majority of things you'll use a list for.
<jemfinch`>
doubly linked lists are rarely of significant utility.
<jemfinch`>
and you can implement doubly linked lists for the purposes you need them (a queue, for instance)
graydon has quit [Read error: 113 (No route to host)]
comatoast has quit ["zzz"]
two-face has joined #ocaml
<two-face>
hi
two-face is now known as tfaway
samx has quit [Remote closed the connection]
tfaway is now known as two-face
nob has joined #ocaml
<nob>
hi
<nob>
what does the optino keyword in record definitions mean ?
<nob>
`option'
nob has quit []
two-face has left #ocaml []
cmk2 has joined #ocaml
graydon has joined #ocaml
Taaus_ has joined #ocaml
Taaus has quit [Read error: 104 (Connection reset by peer)]