3 ms·
Alternative 6: keep a list of closures to execute before returning. Then regardless of the length or complexity, it's always just `cleanup(); return`. For a st
by Groxx 4y ago
Alternative 6: keep a list of closures to execute before returning. Then regardless of the length or complexity, it's always just `cleanup(); return`.
For a structured version of ^ that, see Go's defer.