check : ('a -> bool) -> 'a -> 'a
# check is_var `x:bool`;; val it : term = `x` # check is_var `x + 2`;; Exception: Failure "check".