This question already has an answer here:
I have searched Prolog Operator expected error questions at stack overflow, however I can't identify the error I am getting :
4:26: Syntax error: Operator expected % 3.pl compiled 0.00 sec, 3 clauses
The code is simple:
inc(N,R) :- R is N + 1. % Simple code to increment a number. mapcar( F ,  ,  ). % Base case mapcar( F , [H|T] ,[RH|RT] ) :- % Increment head and put it in Result Head and Recurse for Tail F(H,RH), mapcar(F,T,RT).