| Crates.io | materially |
| lib.rs | materially |
| version | 1.0.0 |
| created_at | 2024-04-26 04:01:59.960061+00 |
| updated_at | 2024-04-26 18:13:04.881156+00 |
| description | A macro for material implication |
| homepage | https://github.com/Jules-Bertholet/materially |
| repository | https://github.com/Jules-Bertholet/materially |
| max_upload_size | |
| id | 1220967 |
| size | 17,938 |
materiallyA macro for material implication.
a => b ("a implies b") means !a || b.
use materially::implies as i;
assert!(i!(false => true));
assert!(i!(false => false));
assert!(i!(true => true));
assert!(!i!(true => false));
// Implication is right-associative
assert!(i!(false => false => false));
// let-chains style syntax is also supported
assert!(i!(let Some(a) = Some(17) => a > 3 => let None = Some(17) => false));