if you have a look at the http4k source and see an...
# http4k
d
if you have a look at the http4k source and see anything else that looks weird or interesting, just let us know. we've used some pretty niche features dotted around, but there's almost always a reason that we chose them. Another unusual but interesting one is that you can define extension methods on interfaces, and then selectively import the implementation you want:
Copy code
package after

import after.Funky2.funkyLength
import after.Funky2.toFunkyHash

interface FunkyTools {
    fun String.toFunkyHash(): Int
    fun String.funkyLength(): Int
}

object Funky2 : FunkyTools {
    override fun String.toFunkyHash() = hashCode() * 2
    override fun String.funkyLength() = length * 2
}

fun totalFunkFactor(input: String): Int = input.toFunkyHash() + input.funkyLength()

val funkFactor = totalFunkFactor("My great funky string")