Hi,
I'm trying to write a prediate that returns every third letter of a list. This is my code so far:
third([],X):-X=[].
third([_],X):-X=[].
third([_,_],X):-X=[].
third([_,_,C|T],X):- third[T,Z], X=[C|Z].
I get the "operator expected" error on the last line.
Does anyone know why?