Skip to content

Instantly share code, notes, and snippets.

@dbuenzli
Last active November 8, 2021 01:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbuenzli/e655590faf132d5150f3684a3d7a69a2 to your computer and use it in GitHub Desktop.
Save dbuenzli/e655590faf132d5150f3684a3d7a69a2 to your computer and use it in GitHub Desktop.
Trojan source for OCaml
(* OCaml Port of fig. 5-6 of https://trojansource.codes/trojan-source.pdf *)
let access_level = "user"
let main () =
if access_level <> "user‮⁦ (* Check if admin *)⁩⁦" then
Printf.printf "You are an admin.\n"
let () = main ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment