List( "TEST1 | TEST4", "TEST1 | TEST5", "TEST1 | TEST6", "TEST2 | TEST4", "TEST2 | TEST5", "TEST2 | TEST6", "TEST3 | TEST4", "TEST3 | TEST5", "TEST3 | TEST6" ) 値を返したい場合どうでしょう? $ scala -version Scala code runner version 2.12.6 -- Copyright 2002-2018, LAMP/EPFL and Lightbend, Inc.