Revision17 has quit [Read error: 110 (Connection timed out)]
qknight has joined #ocaml
<qknight>
hey; let merge (l1, l2) = 0::1::l2;;
<qknight>
is working
<qknight>
let merge (l1, l2) = (l1::l2);;
<qknight>
not
<qknight>
what the hell am i doing wrong?
<qknight>
This expression has type int list * int list but is here used with type
<qknight>
int list * int list list
<qknight>
(the error is for the second command, which is for whatever reason not working)
<qknight>
i would like to add list 1 with list 2
<qknight>
both store ints
<qknight>
let l1 = [3;4;5;4;5;6];;
<qknight>
let l2 = [3;4;5;4;5;6];;
<pango_>
qknight: that's correct, :: type is 'a -> 'a list -> 'a list
<pango_>
also beware that using parenthesis around merge parameters has consequences on its type (it now gets a tuple, not two parameters)
<pango_>
check @ operator
<pango_>
its complexity is O( List.length l1 )
<qknight>
pango_: thanks
<qknight>
with @ it's working
<qknight>
shame on me
<qknight>
so sorry
<qknight>
just didn't think of @
miag has joined #ocaml
ramkrsna has joined #ocaml
miag has quit [Remote closed the connection]
qknight has quit ["Lost terminal"]
Bigbang is now known as Bigb[a]ng
ramkrsna has quit [Read error: 110 (Connection timed out)]
Bigb[a]ng is now known as Bigbang
exa has quit [Connection timed out]
exa has joined #ocaml
Rickdangerous has joined #ocaml
Rickdangerous has left #ocaml []
Skal has joined #ocaml
oracle1 has quit [Remote closed the connection]
kryptt has quit [Read error: 110 (Connection timed out)]
* exa
is away: Away at the moment
exa is now known as exa_away
smimou has joined #ocaml
shirogane has joined #ocaml
mercurylulu has joined #ocaml
mercurylala has quit [Connection reset by peer]
shirogane has quit [Remote closed the connection]
* exa_away
is back.
exa_away is now known as exa
Schmurtz has joined #ocaml
Snark has quit ["Parti"]
__DL__ has joined #ocaml
aegray has joined #ocaml
<aegray>
i'm using the interactive ocaml prompt in linux and i'm wondering if theres a way to make it so that when I press the up key it will bring up the last line I entered (kinda like in bash)? Is that bound to a certain key?
<pango_>
use ledit
<pango_>
alias locaml='ledit -h ~/.ocaml_history -x ocaml'
<pango_>
or run ocaml from within emacs
<pango_>
(but ledit is a lighter solution ;) )
<ulfdoz>
indeed looks nice.
<aegray>
hmm my ledit is broken or something - unknown option -h which makes no sense based on the man page