I am learning both languages, Scala and Haskell. I was asked to transform the following expression to Scala, however I don\'t understand it very well. Could someone help me?