wrap-fn

support sync, async, and generator functions