placeholder_closure

Crates.ioplaceholder_closure
lib.rsplaceholder_closure
version0.1.0
sourcesrc
created_at2021-06-19 09:00:25.457748
updated_at2021-06-19 09:00:25.457748
descriptionScala's Placeholder Syntax for Rust.
homepage
repositoryhttps://github.com/qryxip/placeholder_closure
max_upload_size
id412042
size16,509
Ryo Yamashita (qryxip)

documentation

README

placeholder_closure

CI Crates.io Crates.io

Scala's Placeholder Syntax for Rust.

use placeholder_closure::λ;

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

fn dot<F: FnOnce(Y) -> 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.

License

Licensed under CC0-1.0.

Commit count: 13

cargo fmt