mwgkgk has quit [Quit: Connection closed for inactivity]
jjmeyer0 has joined #ocaml
jjmeyer0 has quit []
jjmeyer0 has joined #ocaml
malina has joined #ocaml
ygrek__ has quit [Ping timeout: 240 seconds]
mfp has quit [Ping timeout: 244 seconds]
jjmeyer0 has quit [Ping timeout: 268 seconds]
slamzy12345 has joined #ocaml
slamzy1234 has joined #ocaml
slamzy12345 has quit [Ping timeout: 256 seconds]
pzp has quit [Quit: Connection closed for inactivity]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 250 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 268 seconds]
malina has quit [Ping timeout: 268 seconds]
pierpal has quit [Read error: Connection reset by peer]
malina has joined #ocaml
slamzy1234 has quit [Ping timeout: 256 seconds]
malina has quit [Ping timeout: 246 seconds]
jao has quit [Ping timeout: 250 seconds]
kalio has quit [Ping timeout: 245 seconds]
kalio has joined #ocaml
kakadu has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 268 seconds]
nullifidian has quit [Remote host closed the connection]
nullifidian has joined #ocaml
nullifidian has quit [Ping timeout: 250 seconds]
iAmDecim_ has quit [Ping timeout: 246 seconds]
nullifidian has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 268 seconds]
pierpal has joined #ocaml
Desetude has joined #ocaml
pierpal has quit [Ping timeout: 244 seconds]
<Desetude>
Hi all, I have the following function: https://gist.github.com/Desetude/99b9d4846860484c66a967adcaaca3ee (I know it's terrible, it's the first function I've created in Ocaml). But I get "This expression has type 'a list but an expression was expected of type int" in the last argument of the recursive call on the last line
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 250 seconds]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 246 seconds]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 246 seconds]
<sonologico>
Desetude, I just pasted it into utop and it compiles for me. I only get warnings about non exhaustive matches
orbifx3 has joined #ocaml
<Desetude>
sonologico: As you said that, I found the problem, it's because I had the args in List.mem the wrong way round so the type inferencing was getting confused
<Desetude>
It seems like Base does List.mem the other way round to some other libs? I'm not really sure
<sonologico>
yes, the stdlib one uses the order that in your original code
<Desetude>
ah ok that's a bit annoying
<sonologico>
I just removed the ~equal:(=) to use the stdlib one when I pasted
<Desetude>
ok thanks. Which list is it talking about with the non exhaustive matches?
<Desetude>
or is it both
pierpal has joined #ocaml
asymptotically has joined #ocaml
<sonologico>
Desetude, both
FreeBirdLjj has joined #ocaml
bartholin has joined #ocaml
<sonologico>
in the function argument list, you're doing something like (h :: t) for both arguments. The warning is saying that you're not considering [] (the empty list)
pierpal has quit [Ping timeout: 240 seconds]
<sonologico>
so you'll get an error if your function is called like `find_first_duplicate_sum [] []`
pierpal has joined #ocaml
jnavila has joined #ocaml
pierpal has quit [Ping timeout: 246 seconds]
pierpal has joined #ocaml
clog has quit [Ping timeout: 240 seconds]
clog has joined #ocaml
mfp has joined #ocaml
Guest27648 has joined #ocaml
Guest27648 has quit [Remote host closed the connection]
pierpal has quit [Read error: Connection reset by peer]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
kalio has quit [Ping timeout: 246 seconds]
orbifx3 has quit [Ping timeout: 250 seconds]
kalio has joined #ocaml
Haudegen has joined #ocaml
orbifx3 has joined #ocaml
orbifx3 has quit [Ping timeout: 246 seconds]
ggole has joined #ocaml
jao has joined #ocaml
tane has joined #ocaml
mjanssen has left #ocaml [#ocaml]
FreeBirdLjj has quit [Remote host closed the connection]
tane_ has joined #ocaml
tane has quit [Quit: Leaving]
FreeBirdLjj has joined #ocaml
slamzy1234 has joined #ocaml
kakadu has quit [Remote host closed the connection]
slamzy1234 has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jao has quit [Ping timeout: 250 seconds]
iAmDecim_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
pierpal has joined #ocaml
olle has joined #ocaml
orbifx3 has joined #ocaml
FreeBirdLjj has joined #ocaml
tane_ has quit [Quit: Leaving]
orbifx3 has quit [Quit: WeeChat 2.1]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
MadcapJake has quit [Remote host closed the connection]
tane has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 250 seconds]
ziyourenxiang has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
slamzy1234 has joined #ocaml
malina has joined #ocaml
malina has quit [Remote host closed the connection]
Bronsa` has quit [Ping timeout: 252 seconds]
Haudegen has quit [Remote host closed the connection]
olle has quit [Ping timeout: 245 seconds]
iAmDecim has quit [Ping timeout: 250 seconds]
MadcapJake has joined #ocaml
zolk3ri has joined #ocaml
kakadu has joined #ocaml
pierpal has quit [Ping timeout: 268 seconds]
oliverfriedmann has quit []
ggole has quit [Quit: ggole]
Haudegen has joined #ocaml
Birdface has joined #ocaml
olle has joined #ocaml
Jesin has joined #ocaml
asymptotically has joined #ocaml
asymptotically has quit [Remote host closed the connection]
asymptotically has joined #ocaml
kark has joined #ocaml
pierpal has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
Birdface has quit [Ping timeout: 268 seconds]
olle has quit [Remote host closed the connection]
kakadu has quit [Ping timeout: 246 seconds]
kakadu_ has joined #ocaml
so has quit [Ping timeout: 246 seconds]
fraxamo has quit [Quit: Leaving]
so has joined #ocaml
drewr has quit [Remote host closed the connection]
tanelso2 has joined #ocaml
tanelso2 has left #ocaml [#ocaml]
tanelso2 has joined #ocaml
<tanelso2>
Hello everyone! I am learning OCaml by doing Advent of Code puzzles. I solved the day1 puzzles, but my code takes 30-40 seconds to find the solution and I'm not really sure why.