Typecheck (lambda args body) as (arg1 -> result).

Based on vector pull request to get expected type in test cases.