arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
sonfon has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 256 seconds]
mxns has joined #ocaml
decentpenguin has quit [Quit: ZNC crashed or something]
decentpenguin has joined #ocaml
shawnw has quit [Remote host closed the connection]
waleee-cl has quit [Quit: Connection closed for inactivity]
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 240 seconds]
shawnw has joined #ocaml
Tuplanolla has joined #ocaml
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
webshinra has quit [Remote host closed the connection]
webshinra has joined #ocaml
_whitelogger has joined #ocaml
vicfred has quit [Quit: Leaving]
ewd has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
sonfon has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
ewd has quit [Ping timeout: 246 seconds]
Haudegen has joined #ocaml
mfp has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
nullcone has quit [Quit: Connection closed for inactivity]
henistein has joined #ocaml
<henistein>
I am a student and I am currently learning ocaml, after I search for some books I found real world ocaml by o’reilley . The problem is that it uses core.std. Should I use another book or it is ok? Do you use that lib often?
<dmbaturin>
henistein: One problem with RWOv1 is that many examples no longer compile with recent Core versions.
<dmbaturin>
If you ignore the Core stuff, it's a good book though.
mxns has quit [Ping timeout: 260 seconds]
<henistein>
yes it explains very well, I will read it and ignore the Core stuff, thanks
mxns has joined #ocaml
mxns has quit [Ping timeout: 240 seconds]
mxns has joined #ocaml
<dmbaturin>
henistein: I'm slowly writing one at https://ocamlbook.org with the idea to stick to the standard library and go bottom up.
<dmbaturin>
Well, and under a free license so that it can be maintained without me.
mxns has quit [Ping timeout: 240 seconds]
<henistein>
wow amazing I will read that
mxns has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
henistein has quit [Quit: Connection closed]
mxns has joined #ocaml
mxns has quit [Ping timeout: 256 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 276 seconds]
mxns has joined #ocaml
ewd has quit [Remote host closed the connection]
kini has quit [Quit: bye]
mxns has quit [Ping timeout: 256 seconds]
waleee-cl has joined #ocaml
kini has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 240 seconds]
mbuf has quit [Quit: Leaving]
mxns has joined #ocaml
bjorkintosh has quit [*.net *.split]
dx has quit [*.net *.split]
copy has quit [*.net *.split]
chewbranca has quit [*.net *.split]
adi__________ has quit [*.net *.split]
cbarrett has quit [*.net *.split]
angerman has quit [*.net *.split]
Boarders has quit [*.net *.split]
jeroud has quit [*.net *.split]
rfv has quit [*.net *.split]
pmonson has quit [*.net *.split]
ipavlo has quit [*.net *.split]
bjorkintosh has joined #ocaml
jeroud has joined #ocaml
angerman has joined #ocaml
rfv has joined #ocaml
Boarders has joined #ocaml
chewbranca has joined #ocaml
dx has joined #ocaml
adi__________ has joined #ocaml
copy has joined #ocaml
pmonson has joined #ocaml
cbarrett has joined #ocaml
ipavlo has joined #ocaml
cbarrett has joined #ocaml
cbarrett has quit [Changing host]
pmonson has quit [Changing host]
pmonson has joined #ocaml
adi__________ has joined #ocaml
ipavlo has joined #ocaml
adi__________ has quit [Changing host]
ipavlo has quit [Changing host]
cbarrett has quit [Max SendQ exceeded]
cbarrett has joined #ocaml
nullcone has joined #ocaml
aspiwack[m] has quit [Ping timeout: 240 seconds]
slt[m] has quit [Ping timeout: 268 seconds]
sonfon has joined #ocaml
aditi314 has quit [Ping timeout: 246 seconds]
smondet[m] has quit [Ping timeout: 268 seconds]
stites[m] has quit [Ping timeout: 268 seconds]
BitPuffin has quit [Ping timeout: 244 seconds]
peddie has quit [Ping timeout: 244 seconds]
tjammer[m] has quit [Ping timeout: 246 seconds]
dash has quit [Ping timeout: 268 seconds]
avsm[m] has quit [Ping timeout: 258 seconds]
pqwy[m] has quit [Ping timeout: 240 seconds]
flux has quit [Ping timeout: 268 seconds]
lnxw37d4 has quit [Ping timeout: 268 seconds]
labor[m] has quit [Ping timeout: 260 seconds]
mxns has quit [Ping timeout: 245 seconds]
Jeanne-Kamikaze has joined #ocaml
jimt[m] has quit [Ping timeout: 258 seconds]
mxns has joined #ocaml
slt[m] has joined #ocaml
henistein has joined #ocaml
<henistein>
I want to make a function that receives a list and if the list has one element it returns it, if not it returns the list, I have this: let one_element l = if ((List.length l) = 1) then (List.nth l 0) else l;;
<henistein>
but it is wrong and I don't know why
aspiwack[m] has joined #ocaml
<d_bot_>
<Christophe> henistein: this cannot type properly because in one case you return a list and in other case you return it's elements
<d_bot_>
<Christophe> for instance in one case you'd return an int list and another case an int, so you cannot give a type to this function
stites[m] has joined #ocaml
<d_bot_>
<Christophe> one option for you would be to use the Either type defined as `type ('a,' b) either = Left of 'a | Right of' b` and in one case you'd return for instance `Left (List.nth l 0)` and other case `Right l`
smondet[m] has joined #ocaml
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
aditi314 has joined #ocaml
peddie has joined #ocaml
BitPuffin has joined #ocaml
dash has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
tjammer[m] has joined #ocaml
mxns has quit [Ping timeout: 246 seconds]
avsm[m] has joined #ocaml
<d_bot_>
<Styxs> how are you actually supposed to do comparisons now in Base since they removed the polymorphic comparator
<d_bot_>
<Styxs> Char.equal / String.equal etc. is quite verbose