Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bkosm/kpipe
A kotlin-native library introducing a functional-style pipe.
https://github.com/bkosm/kpipe
functional-programming kotlin pipe
Last synced: about 1 month ago
JSON representation
A kotlin-native library introducing a functional-style pipe.
- Host: GitHub
- URL: https://github.com/bkosm/kpipe
- Owner: bkosm
- License: apache-2.0
- Created: 2022-11-28T14:12:59.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-01T18:44:35.000Z (about 2 years ago)
- Last Synced: 2024-11-14T19:45:53.585Z (3 months ago)
- Topics: functional-programming, kotlin, pipe
- Language: Kotlin
- Homepage:
- Size: 89.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kpipe
![tests](https://github.com/bkosm/kpipe/actions/workflows/gradle.yml/badge.svg)
![branches](.github/badges/branches.svg)
[![](https://jitpack.io/v/bkosm/kpipe.svg)](https://jitpack.io/#bkosm/kpipe)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 parameter
- `kpipe`- 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 `typealias`es.## a little preview
https://github.com/bkosm/kpipe/blob/5af8eff20cc7537f562aef26d4633ac296c5f490/src/test/kotlin/com/bkosm/kpipe/examples/PipeExample.kt#L13-L90
## currently available via JitPack
```kts
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")
}
```## you decide on the features!
Drop an issue with what functionality you could use in your Kotlin tuple or submit a PR!