Fox was no. 1 in the part 2, steps competition. Let’s look at it.


Without spending a lot of time looking at the code (generated, golf 3529), I get the sense, that this is one of those “in fact different programs for different numbers of rows”. The 2 cases above look very like mine. But then we cross the border to 10+ rows.


There’s a little dance, when the nail heads are written. And when there are more than 10 heads, there’s a little extra cleanup at the end.
Code
.