Porting punch-forward from Haskell to Scala.