Optimization improves to calling the `f` function

Gets rid of extra anonymous functions around `f`