Cleanup some functions in table.lisp
This commit is contained in:
parent
d85f58adf2
commit
9e35fed164
@ -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.
|
"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
|
NOTE: this just gets each expression from the first row, assuming each row has
|
||||||
the same expressions."
|
the same expressions."
|
||||||
(loop for (expr . value) in (car table)
|
(mapcar 'car (car table)))
|
||||||
collect expr))
|
|
||||||
|
|
||||||
(defun extract-truth-table-values (table)
|
(defun extract-truth-table-values (table)
|
||||||
"Return a new table, where each row consists of just the value of the
|
"Return a new table, where each row consists of just the value of the
|
||||||
expression that was originally in that spot in TABLE."
|
expression that was originally in that spot in TABLE."
|
||||||
(loop for row in table
|
(mapcar (lambda (row)
|
||||||
collect (mapcar 'cdr row)))
|
(mapcar 'cdr row))
|
||||||
|
table))
|
||||||
|
|
||||||
|
|
||||||
(defun combine-tables (table1 table2)
|
(defun combine-tables (table1 table2)
|
||||||
|
Loading…
Reference in New Issue
Block a user