materially

Crates.iomaterially
lib.rsmaterially
version1.0.0
sourcesrc
created_at2024-04-26 04:01:59.960061
updated_at2024-04-26 18:13:04.881156
descriptionA macro for material implication
homepagehttps://github.com/Jules-Bertholet/materially
repositoryhttps://github.com/Jules-Bertholet/materially
max_upload_size
id1220967
size17,938
Jules Bertholet (Jules-Bertholet)

documentation

README

materially

Build Status API reference Crates.io License

A macro for material implication.

a => b ("a implies b") means !a || b.

Examples

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));
Commit count: 5

cargo fmt