skylan has quit [Read error: 104 (Connection reset by peer)]
skylan has joined #ocaml
Brian__ has joined #ocaml
Brian__ has quit [Client Quit]
cymonts has joined #ocaml
cymonts has quit [Read error: 60 (Operation timed out)]
gl-limsi has joined #ocaml
malc has joined #ocaml
cymonts has joined #ocaml
cymonts has quit [Read error: 60 (Operation timed out)]
cymonts has joined #ocaml
malc has quit ["no reason"]
yangsx has joined #ocaml
<
yangsx>
in: let foo x = let bar y = ... in try bar y; 0 with Found x -> x;;
<
yangsx>
I want to return x if x is found, otherwise, return 0
<
yangsx>
but the program always return 0
<
yangsx>
when trace, I can see that first x is returned, then 0 is returned
<
yangsx>
Can anybody explain what goes wrong here?
<
yangsx>
exception Found(x) is raised in local function bar
yangsx has quit ["Client Exiting"]
gl-limsi has quit [carter.openprojects.net irc.openprojects.net]
gl-limsi has joined #ocaml
malc has joined #ocaml
cymonts has quit ["Client Exiting"]
gl-limsi has quit ["Client Exiting"]
malc has quit [carter.openprojects.net irc.openprojects.net]
malc has joined #ocaml