docelic has joined #ocaml
docelic has quit ["Client Exiting"]
mr_bubbs has left #ocaml []
Verbed has quit [orwell.freenode.net irc.freenode.net]
Khortl has quit [orwell.freenode.net irc.freenode.net]
teratorn has quit [orwell.freenode.net irc.freenode.net]
mrvn has quit [orwell.freenode.net irc.freenode.net]
rox has quit [orwell.freenode.net irc.freenode.net]
Verbed has joined #ocaml
teratorn has joined #ocaml
mrvn has joined #ocaml
rox has joined #ocaml
Khortl has joined #ocaml
Verbed has quit [orwell.freenode.net irc.freenode.net]
Verbed has joined #ocaml
brwill is now known as brwill|zzz
Khortl has quit [Read error: 60 (Operation timed out)]
<
baader>
Smerdyakov was right, i should learn idioms and concepts 1st
<
Smerdyakov>
I agree with Smerdyakov.
<
Smerdyakov>
Did you know that :> is an OCaml operator of sorts?
<
Smerdyakov>
Now you do!
<
Smerdyakov>
Hm... that might be one, too.
<
Smerdyakov>
That are various fancy brackets to do weird things!
<
baader>
i do have a small question tho: how its the -> "right associative" ?
<
Smerdyakov>
Because a -> b -> c means a -> (b -> c)
<
baader>
let myadd x = function y -> x + y;;
<
baader>
gives: val myadd : int -> int -> int = <fun>
<
baader>
i'm not sure i understand how the -> actually associates two functions
<
baader>
let add x y = x + y ;;
<
Smerdyakov>
What do you mean by "associates two functions"?
<
baader>
i don't understand the difference between a -> b -> c and a -> ( b -> c)
<
mrvn>
# let f g = fun x -> g x;;
<
mrvn>
val f : ('a -> 'b) -> 'a -> 'b = <fun>
<
mrvn>
If -> where left associative the () were unneeded.
<
mrvn>
and some other once where needed
<
Smerdyakov>
There IS no differene between a -> b -> c and a -> ( b -> c)
<
baader>
hm, yes but the ( ) implies some kind of order how arguments are passed, no ?
<
Smerdyakov>
The two strings are names for the exact same type.
<
baader>
let f g = fun x -> g x;; <- could you please explain what this actually means, i'm confused
<
Smerdyakov>
It means that f is a function that takes in one function and returns another function.
<
Smerdyakov>
Is that enough for you?
<
baader>
should be enough
bzhou__ has joined #ocaml
bzhou__ has left #ocaml []
themus has joined #ocaml
<
baader>
actually my question should have been 'how does currying really work', but i've found suitable explanations now
<
mrvn>
The more difficult question is: How does uncurring work with curried functions.
<
baader>
i'll worry about then when/if in run into a problem that requires an answer to that question
<
mrvn>
you won#t, its an implementation detail.
<
baader>
good then :p
CybeRDukE has joined #ocaml
docelic has joined #ocaml
docelic has quit ["Client Exiting"]
rox has quit [Read error: 110 (Connection timed out)]
rox has joined #ocaml
rox has quit [Read error: 60 (Operation timed out)]
rox has joined #ocaml
polin8 has quit ["Lost terminal"]
polin8 has joined #ocaml
CybeRDukE has quit ["Documentation is like sex: when it is good, it is very, very good. And when it is bad, it is better than nothing."]
baader has quit [Remote closed the connection]
baader has joined #ocaml
mrvn_ has joined #ocaml
docelic has joined #ocaml
docelic has quit ["Client Exiting"]
mrvn has quit [Read error: 110 (Connection timed out)]
mrvn_ is now known as mrvn
Khortl has joined #ocaml
baader has quit ["I'll be back"]
docelic has joined #ocaml
docelic has quit ["Client Exiting"]
docelic has joined #ocaml
foxster has quit [Client Quit]
foxster has joined #ocaml
docelic has quit ["Client Exiting"]
CybeRDukE has joined #ocaml
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
listener has joined #ocaml
<
listener>
If I have a value that I want to know the type of, how can I do that?
<
phubuh>
you already know the type of it
<
listener>
In the middle of an expression?
<
phubuh>
clarify what you mean, i don't quite understand
<
phubuh>
are you using classes with inheritance?
<
listener>
SImple example: y=2;; let x=y*y in x*y end;;
<
listener>
I want to print the type of x*y.
<
phubuh>
print_string "int" :)
CybeRDukE has quit ["Drag me, drop me, treat me like an object!"]
brwill|zzz is now known as brwill
Zxcvb has joined #ocaml
<
Zxcvb>
is anyone alive in here?
Zxcvb has left #ocaml []
listener has quit [Read error: 113 (No route to host)]
Verbed has quit ["Client exiting"]
Verbed has joined #ocaml