Or: Turning a function into a promise
So many times while learning how to use promises, or trying to use them in my Angular applications, I would discover pieces of functionality that needed to be a promise, but weren't a $resource
(or one of it's derivates).
Most tutorials show a final result of something like this: