Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- es6
- R
- GIT
- Kotlin
- hadoop
- window
- SPC
- Python
- 보조정렬
- 공정능력
- plugin
- vaadin
- MSSQL
- tomcat
- JavaScript
- Express
- Android
- react
- mapreduce
- table
- Eclipse
- NPM
- Sqoop
- Java
- IntelliJ
- SSL
- SQL
- xPlatform
- Spring
- mybatis
Archives
- Today
- Total
반응형
목록fold (1)
DBILITY
kotlin reduce, fold
empty colletion일때 reduce는 오류가 발생한다. java.lang.UnsupportedOperationException: Empty collection can't be reduced. 가능성이 있을때는 fold를 사용해도 되나?^^ data class Todo(val id: Int, val content: String, val datetime: Long) ... private val initDataList = mutableListOf() /*val maxId = fold(Todo(0, String(), 0L)) { acc, todo -> if (acc.id.compareTo(todo.id) == 1) acc else todo }.id + 1*/ var maxId = 1 if (size>1..
android/kotlin
2024. 3. 11. 10:57
반응형