An open API service indexing awesome lists of open source software.

https://github.com/aweirddev/chainit

Quick solve for "PLEASE JUST MAKE THIS SHI CHAIN!!!!!!!" situations.
https://github.com/aweirddev/chainit

chain rust

Last synced: 5 months ago
JSON representation

Quick solve for "PLEASE JUST MAKE THIS SHI CHAIN!!!!!!!" situations.

Awesome Lists containing this project

README

          

# chainit
This essentially solves the "PLEASE JUST MAKE THIS SHI CHAIN!!!!!!!" situations.

Just use the `chained()` function and start chaining everything.

```rust
use chainit::chained;

fn do_something() {}

fn main() {
let res = chained(100)
.chain(|item| item - 1)
.chain(|mut item| {
item += 1;
do_something();

item
})
.take();

assert_eq!(res, 100);
}
```