Fix #181. Add promise.tap, unit tests, and docs