Version française
Home     About     Download     Resources     Contact us    
Browse thread
Amb
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Tom <tom.primozic@g...>
Subject: Re: [Caml-list] Amb
What would amb do with this kind of program:

let f_out = open_out "file1.tmp";;
output_string f_out "good\n";;
close_out;;

if (abm [(fun _ -> false); (fun _ -> true)]) then
     let f_in = open_in "file1.tmp" in
     if input_line f_in = "good" then exit 0 (* SUCCESS *)
     else raise Amb
else
      let f_out2 = open_out_get [Open_trunc] 0o777 "file1.tmp" in
      output_string f_out2 "bad\n"


?

- Tom