{ //ॱ൪ʹstrʹ͕ೖͬͯΔ } ͙Δ͙Δ·Θ͢(JavaͰݴ͏֦ுfor) val strs = Seq("a", "b", "c") for((str, index) <- strs.zipWithIndex) { //strʹཁૉɺindexindex } JavaͰ͍͏֦ுforͷ index(Կ൪ͷཁૉ͔)औಘͰ͖·͢ʂ val strs = Seq("a", "b", "", "d") for(str <- strs if str.nonEmpty) { //“a”,”b”,”d”ͷ࣮࣌ߦ͞ΕΔ } ۭจࣈ͡Όͳ͍͚ͭͩॲཧରʹ͍ͨ͠ʂ val strs = Seq("a", "b", "c") val newStrs = for(str <- strs) yield { "new:" + str } →newStrs৽͘͠࡞ΒΕͨList list͔Β৽͍͠listΛ࡞Γ·͠ΐ͏ (for͕݁ՌΛฦ͠·͢)