Skip to Content
자바에서 코틀린으로
book

자바에서 코틀린으로

by 덩컨 맥그레거, 냇 프라이스, 오현석
November 2022
Beginner to intermediate
544 pages
12h 39m
Korean
Hanbit Media, Inc.
Content preview from 자바에서 코틀린으로
493
22
클래스에서 함수로
예제
22.28
[
table
-
reader
.
21
:
src
/
main
/
java
/
travelator
/
tablereader
/
table
-
reading
.
kt
]
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.
Start your free trial

You might also like

고성능 파이썬(2판)

고성능 파이썬(2판)

오현석, 미샤 고렐릭, 이안 오스발트
러닝 타입스크립트

러닝 타입스크립트

조시 골드버그
실리콘밸리 리더십

실리콘밸리 리더십

김정혜, 마이클 롭

Publisher Resources

ISBN: 9791169210447