i have to write into csv file with csv_write_file.
My actual code is:
insert(T, File, Data) :-
Data = [X | Xs],
X =.. [_, _, A, B, C],
csv_write_file(File, [row(A, B, C)], [separator(0'\t)]),
insert(T, File, Xs).
Data is a list like this :
[test(name, a, b, c), test(name, d, e, f), test(name, g, h, i)].
At the end, the file contain only last element of list --> g h i
but i want a file like this:
a b c
d e f
g h i
Whats wrong with my implementation ? thanks.