Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- write_table(Cells, Data) :-
- (var(Data)
- ; var(Cells)),
- write('Data source not instantiated. \n').
- write_table(Cells, [H|Rest]) :-
- write(H),
- Remain is Cells - 1,
- write_table(Cells, Remain, Rest).
- write_table(Cells, Remain, [H|Rest]) :-
- Remain < 1 ->
- ( nl,
- write_table(Cells, [H|Rest]))
- ; (write(', '),
- write(H),
- RemainM1 is Remain - 1,
- write_table(Cells, RemainM1, Rest)).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement