Implemented retry.wrap for #6, also added tests and documentaion

This callback is not part of the documentation yet is it?