summaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/sequence.kt
diff options
context:
space:
mode:
authornea <romangraef@gmail.com>2021-08-12 23:37:47 +0200
committernea <romangraef@gmail.com>2021-08-12 23:37:47 +0200
commit2ee4b7c2bef9f80ed12e58bc3cdbb965299920e1 (patch)
treed4ac288bb7c9e15acfd9cfa1868a69b0b15fc30e /src/main/kotlin/util/sequence.kt
parent14f72a3d6005dec3f9fc1e9832161b5de0d1b354 (diff)
downloadwebos-2ee4b7c2bef9f80ed12e58bc3cdbb965299920e1.tar.gz
webos-2ee4b7c2bef9f80ed12e58bc3cdbb965299920e1.tar.bz2
webos-2ee4b7c2bef9f80ed12e58bc3cdbb965299920e1.zip
file system rework
Diffstat (limited to 'src/main/kotlin/util/sequence.kt')
-rw-r--r--src/main/kotlin/util/sequence.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/kotlin/util/sequence.kt b/src/main/kotlin/util/sequence.kt
new file mode 100644
index 0000000..72b07dc
--- /dev/null
+++ b/src/main/kotlin/util/sequence.kt
@@ -0,0 +1,5 @@
+package util
+
+fun <T> Iterable<T>.expandWith(t: T): Sequence<T> =
+ this.asSequence() + generateSequence { t }.asSequence()
+