diff --git a/solution.pl b/solution.pl index 4ff6ff5..887296f 100644 --- a/solution.pl +++ b/solution.pl @@ -31,7 +31,9 @@ order as they were supplied to create table/2). If the given table does not exist, the predicate must throw a descriptive exception (use throw/1). */ -/* cols(Table, Cols). */ +cols(Table, Cols) :- + (tabl(Table, _) -> tabl(Table, Cols)); + throw("Table doesn't exist"). :- dynamic row/2. /*