Last active
September 7, 2016 11:17
-
-
Save milesrout/e63beb7dff68766d147f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[macro_use] | |
mod macros { | |
#[macro_export] | |
macro_rules! prop { | |
(($($t:tt)*)) => (prop!($($t)*)); | |
(T) => (Proposition::True); | |
(F) => (Proposition::False); | |
(!$e:tt) => (Proposition::Not(box prop!($e))); | |
($e:tt ^ $f:tt) => (Proposition::And(box prop!($e), box prop!($f))); | |
($e:tt v $f:tt) => (Proposition::Or(box prop!($e), box prop!($f))); | |
($e:tt -> $f:tt) => (Proposition::Implies(box prop!($e), box prop!($f))); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment