Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/qryxip/placeholder_closure

Scala's Placeholder Syntax for Rust
https://github.com/qryxip/placeholder_closure

Last synced: 24 days ago
JSON representation

Scala's Placeholder Syntax for Rust

Awesome Lists containing this project

README

        

# placeholder_closure

[![CI](https://github.com/qryxip/placeholder_closure/workflows/CI/badge.svg)](https://github.com/qryxip/placeholder_closure/actions?workflow=CI)
[![Crates.io](https://img.shields.io/crates/v/placeholder_closure.svg)](https://crates.io/crates/placeholder_closure)
[![Crates.io](https://img.shields.io/crates/l/placeholder_closure.svg)](https://crates.io/crates/placeholder_closure)

Scala's Placeholder Syntax for Rust.

```rust
use placeholder_closure::λ;

let xs = xs.into_iter().map(λ!($ + 1)).collect::>();

fn dot Z, G: FnOnce(X) -> Y, X, Y, Z>(f: F, g: G) -> impl FnOnce(X) -> Z {
λ!(move { f(g($)) })
}
```

## Usage

See the [documentation on Docs.rs](https://docs.rs/placeholder_syntax).

## License

Licensed under [CC0-1.0](https://creativecommons.org/publicdomain/zero/1.0/).