I’m trying to write hasRepetition that ‘recives’ a list and returns true if and only if it has repetitions in it.
I wrote : hasRepetition([Head|Tail]) :- member(Head,Tail);hasRepetition(Tail).
7 ?- hasRepetition([1,1]).
ERROR: toplevel: Undefined procedure: hasRepetition/1 (DWIM could not correct goal)
Your procedure definition is fine.
I guess you forgot to consult your code, i.e.
consult(name).where name is the name of the file that has your code.