Under The Hood
As you might expect, some of the best and most intuitive kdb/q code is contained within the in-built functions.
Indeed the most experienced kdb developers recommend looking at these functions to obtain a better understanding of the language and its potential.
However the default functions are frequently written in k and are as terse as possible with little to no comments. This can make it difficult to figure out what is going on. So let's see if we can break them down.