There's a name for it, it's called a "spike". You write a bunch of exploratory stuff, get the idea right, throw it all away (without even writing tests) and then come back doing TDD.
Once we established that that works properly, we think of a way to do it clean and tested for all other usecases.
(In the book "the pragmatic programmer" it's called "tracer bullets / code".)
Since typing speed was never the bottleneck in software development. Throwing away the little bit of code you wrote, it not expensive. And writing it back in with TDD is incredibly efficient.