Explain how lazy evaluation works for function arguments in R and how it can impact performance and control flow.
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how R evaluates function arguments lazily and what that means for performance and control flow. It tests understanding of promises, default-argument scoping, the timing of side effects and errors, and the classic closure trap in function factories.