Fix transposed distinctP arguments

The dictionary entry for eq gets passed in first. There was also a
function arity issue with the definition that would quietly fail because
javascript coerces functions to true ( ͡° ͜ʖ ͡°)