diff options
author | Camil Staps | 2015-07-03 17:24:29 +0200 |
---|---|---|
committer | Camil Staps | 2015-07-03 17:32:30 +0200 |
commit | e7eddf78e5fc3c9621b4e819d98e406dd9cb4748 (patch) | |
tree | 87c455f97f1211fdd227d374dcece9c5fb50d20e /Logic.icl | |
parent | Parser; cleanup (diff) |
Improved parser
Diffstat (limited to 'Logic.icl')
-rw-r--r-- | Logic.icl | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -250,6 +250,9 @@ sorted_subexprs = sort o subexprs simple_truthtable :: Expr -> TruthTable simple_truthtable e = {exprs = [Atom a \\ a <- all_atoms e] ++ [e], options = all_atom_options e} +simple_truthtable_n :: [Expr] -> TruthTable // Simple truthtable with multiple expressions +simple_truthtable_n es = {exprs = removeDup ([Atom a \\ a <- flatten (map all_atoms es)] ++ es), options = flatten (map all_atom_options es)} + truthtable :: Expr -> TruthTable truthtable e = {exprs = sorted_subexprs e ++ [e], options = all_atom_options e} |