fun readTableWithHeader(lines: List<String>): List<Map<String, String>> {
return readTable(lines)
}
fun readTable(lines: List<String>): List<Map<String, String>> {
return lines.map { parseLine(it, Int::toString) }
}
여전히 모든 테스트가 제대로 성공하므로 아무것도 깨진 게 없다고 확신할 수 있다.
이 상태에서 어디로 진행해야 할까? 우리 계획은 새
readTableWithHeader
가 헤더 줄을 읽
어서
parseLine
에 전달할
headerProvider
를 만들게 하는 것이다.
readTableWithHeader
와
parseLine
사이에 예전
readTable
에 대한 호출이 존재한다. 따라서
readTable
도
headerProvider
의 값을 전달하기 위해 이 파라미터를 받아야 한다. 따라서 이번에는
readTable
의
Int
::
toString
에서 ‘
Introduce
Paramter
(파라미터 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.