Solution to a simple Hackerrank problem: Compare the Triplets
You don't have to traverse the competitions array twice. The results can be collected in a tuple result after a single traversal.

val results = competitions.foldLeft((0,0)){
                             case ((aw,bw),(a,b)) =&gt; 
                               if (a&gt;b)      (aw+1,bw) //a won
                               else if (b&gt;a) (aw,bw+1) //b won
                               else          (aw,bw)   //tie
                           }


The tuple's elements can be accessed via indexing, results._1 and results._2, but it can be more convenient to unpack it via pattern matching.

val (scoreA, scoreB) = results


So, putting it all together, and removing the competitions step (just because you can).

val (aWins
    ,bWins) = alice.zip(bob)
                   .foldLeft((0,0)){
                      case ((aw,bw),(a,b)) =&gt;
                        if (a&gt;b)      (aw+1,bw)
                        else if (b&gt;a) (aw,bw+1)
                        else          (aw,bw)
                   }


Sending the results to STDOUT is usually done via println(),  either with string catenation...

println(aWins + " " + bWins)


...or with string interpolation.

println(s"$aWins $bWins")