No, compsci textbooks and language manuals do that. SO is not the primary, canonical educational resource you seem to think it is, and they'd be the first to agree.
By and large compsi text books are not sources of large amounts of working code in a specific language. Some programming-oriented ones may be; does Numerical Recipes in C count as a comp sci book?
True, I was assuming that people would think a bit more abstractly, or at least a bit more generously, but sometimes I forget where I am. By "compsci" I mean everything from graduate-level theoretical texts all the way down to "101 BASIC Programs for the TRS-80."
In the old days, magazine articles would also present practical code alongside plaintext explanations of how it worked. There's still no shortage of tutorial content, although not as much in paper form, and even less on Stack Overflow.