You’re not wrong. While writing K you sit in the repl and work out each piece as you go and make sure it gives the result you expect and then build up.
And the result of this trial-and-error programming process is, supposedly, a program that is protected from bugs because... it is short and you can see it on your screen all at once.