top | item 40506892

(no title)

CornCobs | 1 year ago

Yes, though the languages do not support it explicitly you can simulate lazy evaluation by wrapping all your arguments in closures. This way they won't be evaluated until called within the function body.

discuss

order

agumonkey|1 year ago

Sidenote, the evaluation model of python can be surprising. List comprehension will create implicit function scopes that can trip you up.