I would swear that, at one point in the past, I encountered someone’s personal version of a binary search algorithm, which consisted - if I remember correctly - entirely of a for loop and a single statement. E.g.:
for (something) something;
It could have been:
for (something) if (something) return something;
But certainly it looked reasonable to declare a one-liner, even if it might be more nicely laid out on 2 or 3 lines. Still far smaller than most implementations.
There was no recursion, it wasn’t using any operator overloads, macros, or other nonsense. It was just a straightforward binary search (e.g., over an array of ints).
Anyone aware of it? I don’t think it was widely quoted or used. I just found it in a discussion of binary searches.