Aren't you assuming TDD is a reasonable way to drive the design of algorithms? I would not expect someone to design fizzbuzz-like functions using TDD.
(I would expect to see tests, sure, but tests aren't TDD).
(I would expect to see tests, sure, but tests aren't TDD).
Shouldn't it be natural, even expected, to see the tests that drove each iteration of abstraction?
I am particularly interested in how one defines and implements tests for scaling and performance requirements like the 'Lazy Generation' example.
Now the standard response will be that it's an article (or programming book, or interview question) so for the sake of brevity and clarity we omitted the test.
Wouldn't well defined tests help shape the correct amount of generalization and abstraction?