Adds distinctBy to typed pipe

fixes #830