(intermediate value)(...) is not a function attempt fix