Hi, the following seems to do the trick  (?) :

Le 28 mars 10 à 18:38, Dario Teixeira a écrit :

let rec step1 ?story () = match story with
| Some s -> step2 s#title
| None   -> step2 "title1"


and step2 title =
let story =
object
method title = title
method count = 0
end
in step3 ~story


and step3 ~story = match story#count with
| 0 ->
- step1 ~story ()
+               step1 ~story:(story :> <title : string>) ()
| 1 ->
let story =
object
method title = "title2"
end
in step1 ~story ()
| _ ->
true

Cheers,
--
Vincent Aravantinos - PhD Student - Laboratory of Informatics of Grenoble