title: How to make predicate repeat N number of times in Prolog?
body: <p>I have a number of lists containing letters and I have written a predicate that checks whether or not there are duplicates present in one of these given lists:</p>
  
  <pre><code>noDuplicates([]).
  noDuplicates([H|T]):-
    not(member(H, T)),
    noDuplicates(T).
  </code></pre>
  
  <p>I have 10 lists and I want to know if there are no duplicates in any of them, so I made them into sublists of one big list, something like:</p>
  
  <pre><code>[[A,B,C], [C,A,D], [E,F,G]...]]
  </code></pre>
  
  <p>(So there can be duplicates in the big list, but not the individual sublists).</p>
  
  <p>I get that I have to do the duplicates test 10 times; once for every sublist, but how do I write this in Prolog? I could probably write it down 10 times, but my guess is I can use recursion to make prolog repeat itself until all sublists have been checked. </p>
  
  <p>So basically: I want this predicate to repeat itself N times, until N is 10. I'm really struggling with it though. Does anyone have any idea on what to do?</p>