introduce capture macro (#12712)

capture works for more cases than `closureScope`.
This commit is contained in:
Judd 2019-12-10 20:16:37 +08:00 • committed by Andreas Rumpf
commit 56cf3403b4
3 changed files with 41 additions and 0 deletions

View file

@ -42,6 +42,9 @@
`sorted` does.
- Added `sugar.collect` that does comprehension for seq/set/table collections.
- Added `sugar.capture` for capturing some local loop variables when creating a closure.
This is an enhanced version of `closureScope`.
## Library changes
- `asyncdispatch.drain` now properly takes into account `selector.hasPendingOperations`