Jaccard distances calculation

Some magic involved.
No side-effects here?