adamc@728: fun main () =
adamc@728: buf <- Buffer.create;
adamc@728: let
adamc@728: fun loop1 () =
adamc@728: Buffer.write buf "A";
adamc@728: sleep 9;
adamc@728: loop1 ()
adamc@728:
adamc@728: fun loop2 () =
adamc@728: Buffer.write buf "B";
adamc@728: sleep 9;
adamc@728: error Darn
adamc@728: loop2 ()
adamc@728: in
adamc@728: return
adamc@728:
adamc@728:
adamc@728: end