Extracts a lambda from an expression.