Apply f to the resource and return it after closing the resource
If you don't wish to close the resource (e.g. if you are creating an iterator on file contents), use flatMap instead
Apply f to the resource and return it after closing the resource
If you don't wish to close the resource (e.g. if you are creating an iterator on file contents), use flatMap instead