fix bug where Sample does not play
Remove unnecessary anonymous functions in `f()`

An additional anonymous function is not required to run `f`. It is
better (less memory, less cpu) to just call `f` directly.