I believe the result of calling the function was still...a function, which the code still needed to understand how to call. You also didn't like that solution.
There seems to be a great deal of disagreement in the community about what constitutes a "clean" API. Some developers feel like if you don't need to provide a lot of information at the point where you call the API (because the code you're calling is finding everything for itself), that's "clean." Others feel a clean API is one where things can be easily changed/substituted, just by how you call the code. I tend to fall into the latter camp, but I also draw the lines between different parts of my code in different places, so I experience that differently.