aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/SequenceUtil.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/SequenceUtil.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/SequenceUtil.kt11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/SequenceUtil.kt b/src/main/kotlin/moe/nea/firmament/util/SequenceUtil.kt
deleted file mode 100644
index 7b5bad0..0000000
--- a/src/main/kotlin/moe/nea/firmament/util/SequenceUtil.kt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-package moe.nea.firmament.util
-
-fun <T : Any> T.iterate(iterator: (T) -> T?): Sequence<T> = sequence {
- var x: T? = this@iterate
- while (x != null) {
- yield(x)
- x = iterator(x)
- }
-}