Cancellable Function
This exercise wraps a synchronous generator in a promise and exposes a cancel function. Cancellation is sent back into the generator as an error so its own try/catch logic can respond.
This exercise wraps a synchronous generator in a promise and exposes a cancel function. Cancellation is sent back into the generator as an error so its own try/catch logic can respond.