scala oneliner
Code\n\nobject Solution {\n  def similarPairs: Array[String] => Int = _.map(_.toSet).groupBy(identity)\n    .values.map(_.size).filter(_ > 1).map(x => x*(x-1)/2
# Code\n```\nobject Solution {\n  def similarPairs: Array[String] => Int = _.map(_.toSet).groupBy(identity)\n    .values.map(_.size).filter(_ > 1).map(x => x*(x-1)/2).sum\n}\n```
['String', 'Scala']