refactor
This commit is contained in:
13
src/main/kotlin/blitz/collections/ListOps.kt
Normal file
13
src/main/kotlin/blitz/collections/ListOps.kt
Normal file
@@ -0,0 +1,13 @@
|
||||
package blitz.collections
|
||||
|
||||
fun <T> MutableList<T>.removeFirst(count: Int) {
|
||||
repeat(count) {
|
||||
removeFirst()
|
||||
}
|
||||
}
|
||||
|
||||
fun <T> MutableList<T>.removeLast(count: Int) {
|
||||
repeat(count) {
|
||||
removeLast()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user