Is it to possible to create N
elements of 0
array in another way than the following one:
makeInitialArray(N, A) :-
N > 0,
Nn is N-1,
makeInitialArray(Nn, B),
append([0], B, A).
makeInitialArray(0, []).
It is a poor way on my eye because of the fact of recurrence. I suppose that will be made to call very often operation like that.