Skip to content

Instantly share code, notes, and snippets.

@Octachron
Created April 12, 2021 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Octachron/8db5ce9d8e24368360344f337e294aef to your computer and use it in GitHub Desktop.
Save Octachron/8db5ce9d8e24368360344f337e294aef to your computer and use it in GitHub Desktop.
type 'a term =
| Var of 'a
| App of 'a term * 'a term
let rec pp pp_elt ppf = function
| Var x -> pp_elt ppf x
| App(f,x) ->
Format.fprintf ppf "%a(%a)" (pp pp_elt) f (pp pp_elt) x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment