summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib-dynlink-native/plugin.ml
blob: d9b0574f1bdb8053ff4b24498ee13ed83909ec45 (plain)
1
2
3
4
5
6
7
8
9
10
11
let rec f x = ignore ([x]); f x

let rec fact n = if n = 0 then 1 else n * fact (n - 1)

let facts = [ fact 1; fact 2; fact 3; fact (Random.int 4) ]

let () =
  Api.reg_mod "Plugin";
  Api.add_cb (fun () -> print_endline "Callback from plugin");
  print_endline "COUCOU";
  ()