Cookbook: sorting. Closes #13.