Infinite apply

Helper to do apply on function with infinite arguments.