projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
🎨 Replace future reply filter with Kotlin version
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
utils
/
Pagination.kt
diff --git
a/src/main/kotlin/net/pterodactylus/sone/utils/Pagination.kt
b/src/main/kotlin/net/pterodactylus/sone/utils/Pagination.kt
index
3330e78
..
5d48d61
100644
(file)
--- a/
src/main/kotlin/net/pterodactylus/sone/utils/Pagination.kt
+++ b/
src/main/kotlin/net/pterodactylus/sone/utils/Pagination.kt
@@
-43,4
+43,5
@@
class Pagination<out T>(private val originalItems: List<T>, pageSize: Int): Iter
}
-fun <T> Iterable<T>.paginate(pageSize: Int) = Pagination<T>(toList(), pageSize)
+fun <T> Iterable<T>.paginate(pageSize: Int) = Pagination(toList(), pageSize)
+fun <T> Sequence<T>.paginate(pageSize: Int) = Pagination(toList(), pageSize)