Language
LeakyModule
A variation of Module, which comes with its own garbage collector, that prevents symbols from being garbage collected by WL
LeakyModule[symbols_List, expr_, opts___] _The only difference compared to traditional Module is an optional argument
"Garbage" :> _Lista held symbol, that points to a list.
Then a user can manually purge them.
AbortableTable
AbortableTable[expr, iter1, iter2, ...] generates a list of values from expr over the given iterators. If evaluation is aborted before completion, AbortableTable returns the partial results collected up to that point instead of discarding them.
For example:
AbortableTable[
Pause[1];
i^2
, {i, 10}]