Skip to content

Commit

Permalink
Add awkward example
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusf committed Sep 13, 2023
1 parent 6e0827b commit acc5ebd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/examples/awkward.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

let awkward =
let r = ref 0 in
fun f -> assert (!r mod 2 = 0); incr r; f(); incr r

let () =
ignore (awkward (fun () -> ignore (awkward (fun () -> ()))))

0 comments on commit acc5ebd

Please sign in to comment.