Or the code has been added to the training data.

It may or may not have, but it does match my experience that haiku is quite good at coding implementations on its own now