https://github.com/qryxip/placeholder_closure
Scala's Placeholder Syntax for Rust
https://github.com/qryxip/placeholder_closure
Last synced: 4 months ago
JSON representation
Scala's Placeholder Syntax for Rust
- Host: GitHub
- URL: https://github.com/qryxip/placeholder_closure
- Owner: qryxip
- License: cc0-1.0
- Created: 2021-06-19T08:50:28.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-19T09:00:38.000Z (about 4 years ago)
- Last Synced: 2025-03-01T16:06:09.888Z (5 months ago)
- Language: Rust
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# placeholder_closure
[](https://github.com/qryxip/placeholder_closure/actions?workflow=CI)
[](https://crates.io/crates/placeholder_closure)
[](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/).