Skip to content

Commit a71eb44

Browse files
committed
feat: update readme.md
1 parent eb7d740 commit a71eb44

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ boolean-table expression "(a -> ~b) == (b | a)" --step
6767
```bash
6868
# Truth table for (a -> ~b) == (b | a) by printing subexpressions
6969
| a | b | ~b | (a -> ~b) | (b | a) | (a -> ~b) == (b | a) |
70-
|------|------|-------|-----------|----|----|----------------------|
71-
| 0 | 0 | 1 | 1 | 0 | 0 | 0 |
72-
| 0 | 1 | 0 | 1 | 1 | 1 | 1 |
73-
| 1 | 0 | 1 | 1 | 1 | 1 | 1 |
74-
| 1 | 1 | 0 | 0 | 1 | 0 | 0 |
70+
|------|------|-------|-----------|---------|----------------------|
71+
| 0 | 0 | 1 | 1 | 0 | 0 |
72+
| 0 | 1 | 0 | 1 | 1 | 1 |
73+
| 1 | 0 | 1 | 1 | 1 | 1 |
74+
| 1 | 1 | 0 | 0 | 1 | 0 |
7575
```

src/booleanTable/index.ts

-4
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ class BooleanTable implements IBooleanTable {
107107
let header = allExpressions.map((exp, idx) => {
108108
return exp.padEnd(columnWidths[idx]);
109109
})
110-
.map((exp) => (
111-
["|", "&", "->", "==", "~"].some((op) => exp.includes(op)) && exp !== this.input ?
112-
`(${exp})` : exp
113-
))
114110
.join(" | ");
115111

116112
console.log(header);

0 commit comments

Comments
 (0)