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 | 29 | 30 | 31 |
Tags
- xPlatform
- es6
- Spring
- mapreduce
- react
- Eclipse
- JavaScript
- IntelliJ
- table
- 보조정렬
- Sqoop
- mybatis
- SQL
- window
- tomcat
- Express
- Java
- Android
- MSSQL
- vaadin
- GIT
- Kotlin
- plugin
- NPM
- hadoop
- Python
- SSL
- SPC
- R
- 공정능력
Archives
- Today
- Total
728x90
목록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
728x90