Can someone explain to me why the pipe character works here? The pipe character is a method or String ? StringOps? Tried searching the API, nope no pipe character method in either.
def doTranslate(condons:Iterator[String], accum:List[String]):List[String] = condons.hasNext match {
case true => condons.next match {
case "AUG" => doTranslate(condons, accum :+ "Methionine")
case "UUU" | "UUC" => doTranslate(condons, accum :+ "Phenylalanine")
case "UUA" | "UUG" => doTranslate(condons, accum :+ "Leucine")
case "UCU" | "UCC" | "UCA" | "UCG" => doTranslate(condons, accum :+ "Serine")
case "UAU" | "UAC" => doTranslate(condons, accum :+ "Tyrosine")
case "UGU" | "UGC" => doTranslate(condons, accum :+ "Cysteine")
case "UGG" => doTranslate(condons, accum :+ "Tryptophan")
case "UAA" | "UAG" | "UGA" => accum
}
case false => accum
}