oops: the last commit but properly
This commit is contained in:
parent
c6628aedd1
commit
8fa9f3698c
1 changed files with 4 additions and 4 deletions
8
Main.hs
8
Main.hs
|
@ -263,12 +263,12 @@ truthtable s = open <> header <> "\\hline\n" <> body <> close
|
|||
|
||||
line assignments =
|
||||
intercalate " & " (bools assignments) <>
|
||||
" & " <>
|
||||
intercalate " & " (parts assignments) <>
|
||||
" \\\\\n"
|
||||
" &" <>
|
||||
intercalate "&" (parts assignments) <>
|
||||
"\\\\\n"
|
||||
|
||||
bools assignments = [if bool then "1" else "0" | (key, bool) <- assignments]
|
||||
|
||||
parts assignments =
|
||||
(\xs -> [[x] | x <- filter (\i -> i /= ' ') xs]) $
|
||||
(\xs -> [if x /= ' ' then [' ', x, ' '] else " " | x <- xs]) $
|
||||
fromJust $ serializeLatexTruthTableRow assignments s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue