use shorter form for comparator
Merge pull request #2706 from akre54/comparator-docs

Update comparator example in the docs