Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Evaluate argument lazily with escaping autoclosure #10

Closed
wants to merge 1 commit into from

Conversation

pyrtsa
Copy link

@pyrtsa pyrtsa commented May 9, 2015

This should fix 99dadd3#diff-360d1675e0d2b6a0544b37d913f5e599, though I'm not 101% sure this solution works in all possible circumstances. Discuss!

@robrix
Copy link
Owner

robrix commented May 9, 2015

It does, yes. That said, I’m persuaded by @jspahrsummers that @autoclosure(escaping) is unnecessarily obtuse for this purpose anyway.

@pyrtsa
Copy link
Author

pyrtsa commented May 9, 2015

Agreed. In that case, the README should be updated here:

var memos = 0
let implicitClosure = Memo(++memos)

@robrix
Copy link
Owner

robrix commented May 9, 2015

Oof, good catch. I’ll tackle that; thanks very much for the PR!

@robrix robrix closed this May 9, 2015
@robrix
Copy link
Owner

robrix commented May 9, 2015

Fixed in 77860c8.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants