spew has quit [Quit: Connection closed for inactivity]
pierpal has joined #ocaml
keep_learning_M has quit [Quit: This computer has gone to sleep]
keep_learning_M has joined #ocaml
keep_learning_M has quit [Client Quit]
SgrA has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
SgrA has quit [Ping timeout: 250 seconds]
notzmv has joined #ocaml
ziyourenxiang has quit [Ping timeout: 246 seconds]
marsam has joined #ocaml
fantasticsid has joined #ocaml
fantasticsid has quit [Client Quit]
Haudegen has quit [Ping timeout: 244 seconds]
ocabot has quit [Ping timeout: 244 seconds]
h11 has quit [Ping timeout: 240 seconds]
jao has quit [Remote host closed the connection]
ocabot has joined #ocaml
FreeBirdLjj has joined #ocaml
jao has joined #ocaml
ocabot has quit [Ping timeout: 268 seconds]
companion_cube has quit [Ping timeout: 252 seconds]
ocabot has joined #ocaml
companion_cube has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 244 seconds]
ygrek has joined #ocaml
SgrA has joined #ocaml
h11 has joined #ocaml
mfp has quit [Ping timeout: 250 seconds]
marsam has quit [Ping timeout: 252 seconds]
keep_learning_M has joined #ocaml
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 268 seconds]
keep_learning_M has quit [Quit: This computer has gone to sleep]
Jeanne-Kamikaze has joined #ocaml
keep_learning_M has joined #ocaml
jao has quit [Ping timeout: 272 seconds]
iovec has quit [Quit: Connection closed for inactivity]
glassofethanol has joined #ocaml
glassofethanol has left #ocaml [#ocaml]
ygrek has quit [Ping timeout: 250 seconds]
KeyJoo has joined #ocaml
quipa_ has quit [Remote host closed the connection]
quipa_ has joined #ocaml
quipa_ has quit [Max SendQ exceeded]
quipa_ has joined #ocaml
deli has quit [Ping timeout: 250 seconds]
quipa_ has quit [Max SendQ exceeded]
quipa_ has joined #ocaml
quipa_ has quit [Remote host closed the connection]
quipa_ has joined #ocaml
MadcapJake has quit [Quit: MadcapJake]
MadcapJake has joined #ocaml
<Enjolras>
greet is a function that takes a string, appends it to the string "Hello " using the string concat operator ^
<Enjolras>
then greet "World" calls this function
<Enjolras>
"y in greet" is not how it reads.
<Enjolras>
let greet y = "Hello" ^ y <- this binds the function fun y -> "Hello " ^ y" to the name greet
<Enjolras>
then "in" means, this binding is defined for the following expression greet "World", which is a simple function call
<quarters>
Enjolras, thank you!
<quarters>
so greet won't be able to be called again
<quarters>
it was purely defined to be called that one time
<Enjolras>
well you can call it several times
<Enjolras>
let greet y = "Hello" ^ y in greet "World" ^ " and" ^ greet " you"
<Enjolras>
this will return "Hello World and Hello you"
<Enjolras>
but yes, it is defined to be called in the follow expression
<Enjolras>
for instance let f x = let g x = x + 1 in g x in f 4
<Enjolras>
g is not visible outside of the body of f
<Enjolras>
that being said, you better read an introduction to ocaml :)
<quarters>
Enjolras, I've been trying to find one but I couldn't even find one that describes ^ as being for string concatenation. I had to look up "caret ocaml" in google
<Enjolras>
i'm not really sure what are good book for beginner to be honnest
<quarters>
I'm coming from c-based languages and I was wondering if there's one you can recommend...the ones on ocaml.org have been difficult to follow with regards to having the info get me going