k.all example fleshed out. Added a helper function.