diff options
author | Dico <dico.karssiens@gmail.com> | 2018-09-27 07:03:02 +0100 |
---|---|---|
committer | Dico <dico.karssiens@gmail.com> | 2018-09-27 07:03:02 +0100 |
commit | 842e52bd92f0c67aa1906b899ce600ecb3b26bda (patch) | |
tree | f0e03e66ba0dfeb8d3aee58a09acd6889f5ee20e /src/main/kotlin/io/dico/parcels2/util/ext/Misc.kt | |
parent | 307b7aee4af34e47139259db7049a85c682b7be2 (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.kt | 5 |
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) +} |