Skip to content

Instantly share code, notes, and snippets.

@hc5
Created April 11, 2012 01:53
Show Gist options
  • Select an option

  • Save hc5/2356308 to your computer and use it in GitHub Desktop.

Select an option

Save hc5/2356308 to your computer and use it in GitHub Desktop.
fun occurs (a , Arrow(t,s) ) = (occurs (a,t) orelse occurs (a,s)) |
occurs (a, Product(t,s) ) = (occurs (a,t) orelse occurs (a,s)) |
occurs (t as ref(NONE), TVar(s as ref(NONE))) = (t = s)|
occurs (t, s) = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment