Re: how to make a list of N 1s



makeN1(N, L) :-
N == 0, !,
L = []
;
N1 is N - 1,
L = [1 | Tail],
makeN1(N1, Tail).

.