Pipe functions that allow for a more functional style of programming. They support chains of transformation up to 11 in size, providing excellent DX on top.
The library includes:
pipe- a function that pipes the result of one function to the next as a parameterkpipe- a function that pipes the result of one function to the next as context receiver and the initial value as a parameter
The functions are implemented as a invoke override on the companion, so you can name them whatever you want with
typealiases.
kpipe/src/test/kotlin/com/bkosm/kpipe/examples/PipeExample.kt
Lines 13 to 90 in 5af8eff
repositories {
// all the other ones that you might need...
maven { url = uri("https://jitpack.io") }
}
// and then
dependencies {
// all the other ones that you might need...
testImplementation("com.github.bkosm:kpipe:1.0.0")
}Drop an issue with what functionality you could use in your Kotlin tuple or submit a PR!