-- depth:
-- app (Val s) a = Val $ succ $ max s $ measure a


-- | the size of a term. 
-- to evaluate the size of an abstraction,
-- we apply it (its semantics) 
-- to (a semantics object that represents) a variable.
measure :: Val -> Integer
measure (Val s) = s
measure :: Val -> Integer
measure (Val s) = s
measure (Val s) = s