I\'m building a similarity matrix of a list of items. The naive approach is to iterate the list twice, but this needlessly will compare A:B and B:A when they\'re th