Cleanup some functions in table.lisp

This commit is contained in:
Alexander Rosenberg 2024-09-04 12:33:12 -07:00
parent d85f58adf2
commit 9e35fed164
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -54,14 +54,14 @@ if it is excluded, `discover-variables' will be used to generate it."
"Extract each expression from TABLE and return them as a list.
NOTE: this just gets each expression from the first row, assuming each row has
the same expressions."
(loop for (expr . value) in (car table)
collect expr))
(mapcar 'car (car table)))
(defun extract-truth-table-values (table)
"Return a new table, where each row consists of just the value of the
expression that was originally in that spot in TABLE."
(loop for row in table
collect (mapcar 'cdr row)))
(mapcar (lambda (row)
(mapcar 'cdr row))
table))
(defun combine-tables (table1 table2)