Hamming distance in Scala Problem

Write a program that can calculate the Hamming difference between two DNA strands.
GAGCCTACTAACGGGAT
CATCGTAATGACGGCCT
^ ^ ^  ^ ^    ^^


Code
object Hamming {
  def compute(s1: String, s2: String): Int = {
    if (s1.length != s2.length)
      throw new IllegalArgumentException()
    (s1.toList).zip(s2.toList)
               .filter(current =&gt; current._1 != current._2)
               .length
  }  
}

Test Suite
import org.scalatest._

class HammingSpecs extends FlatSpec with Matchers {
  it should &quot;detect no difference between empty strands&quot; in {
    Hamming.compute(&quot;&quot;, &quot;&quot;) should be (0)
  }

  it should &quot;detect no difference between identical strands&quot; in {
    Hamming.compute(&quot;GGACTGA&quot;, &quot;GGACTGA&quot;) should be (0)
  }

  it should &quot;detect complete hamming distance in small strand&quot; in {
    Hamming.compute(&quot;ACT&quot;, &quot;GGA&quot;) should be (3)
  }

  it should &quot;give hamming distance in off by one strand&quot; in {
    Hamming.compute(&quot;GGACGGATTCTG&quot;, &quot;AGGACGGATTCT&quot;) should be (9)
  }

  it should &quot;give small hamming distance in middle somewhere&quot; in {
    Hamming.compute(&quot;GGACG&quot;, &quot;GGTCG&quot;) should be (1)
  }

  it should &quot;give a larger distance&quot; in {
    Hamming.compute(&quot;ACCAGGG&quot;, &quot;ACTATGG&quot;) should be (2)
  }

  it should &quot;be undefined for strands of unequal length&quot; in {
    an[IllegalArgumentException] should be thrownBy {
      Hamming.compute(&quot;AAACTAGGGG&quot;, &quot;AGGCTAGCGGTAGGAC&quot;)
    }
  }
}

Source
Strings have a .zip() method; calling .toList() is superfluous.

Instead of .filter(…) and .length(), use .count(…).

I'm not a fan of the name current, which has a connotation of iteration.

Avoid omitting braces with if statements.  If you want to do so, put the body on the same line to avoid accidents.

object Hamming {
  def compute(s1: String, s2: String): Int = {
    if (s1.length != s2.length) throw new IllegalArgumentException()
    s1.zip(s2).count(pair =&gt; pair._1 != pair._2)
  }  
}