summaryrefslogtreecommitdiff
path: root/src/main/kotlin/io/dico/parcels2/util/ext/Misc.kt
diff options
context:
space:
mode:
authorDico <dico.karssiens@gmail.com>2018-09-27 07:03:02 +0100
committerDico <dico.karssiens@gmail.com>2018-09-27 07:03:02 +0100
commit842e52bd92f0c67aa1906b899ce600ecb3b26bda (patch)
treef0e03e66ba0dfeb8d3aee58a09acd6889f5ee20e /src/main/kotlin/io/dico/parcels2/util/ext/Misc.kt
parent307b7aee4af34e47139259db7049a85c682b7be2 (diff)
Fixes n tweaks
Diffstat (limited to 'src/main/kotlin/io/dico/parcels2/util/ext/Misc.kt')
-rw-r--r--src/main/kotlin/io/dico/parcels2/util/ext/Misc.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/kotlin/io/dico/parcels2/util/ext/Misc.kt b/src/main/kotlin/io/dico/parcels2/util/ext/Misc.kt
index 4df4d52..a826687 100644
--- a/src/main/kotlin/io/dico/parcels2/util/ext/Misc.kt
+++ b/src/main/kotlin/io/dico/parcels2/util/ext/Misc.kt
@@ -77,3 +77,8 @@ class EditLoopScope<T, U>(val _map: MutableMap<T, U>) {
operator fun Formatting.plus(other: Formatting) = toString() + other
operator fun Formatting.plus(other: String) = toString() + other
+
+inline fun <T> Pair<T, T>.forEach(block: (T) -> Unit) {
+ block(first)
+ block(second)
+}