I wanted to figure out a way to "force" an implementor to call a completion block before exiting. Because the constructor for a CompletionBlock.Called
is fileprivate, the only way for an implementor to "get" one (to satisfy its return type requirement) is to use the call
function on the CompletionBlock
argument that was passed to it.
If we need to model an addition return value, it wouldn't be too hard to extend CompletionBlock
to be generic and accept an argument (or void).