just whipped up, so questionable quality, but I th...
# announcements
b
just whipped up, so questionable quality, but I think it demonstrates the idea:
Copy code
type TransformerFn fun(ByteArray): ByteArray

fun useTimer(t: TransformerFn): TransformerFn {
    return (bytes -> {
        startTimer()
        t(bytes)
        endTimer()
    })
}