Scala filter on two conditions Scala filter on two conditions arrays arrays