That criticism looks unfair to me because you did not quote the very next sentence which was relevant:
"Gee, that’s complicated! I must be really smart to have
written such a function, right?
Wrong! I just have a trick!"
Seems like the author deliberately picked an example that looks hard but isn't once you understand what he wants to say.