collection.map(f).flatten(m)를 보고하고 collection.flatMap으로 바꿀 것을 제안합니다.
collection.map(f).flatten(m)
collection.flatMap
예:
Seq(1, 10).map(i => Seq(i, i + 10)).flatten
빠른 수정 적용 후:
Seq(1, 10).flatMap(i => Seq(i, i + 10))