Reputation: 93
I'm trying to define an infix operator but I keep getting errors. I'm using GNU Prolog 1.4.
I tried this: [user]. op(35, xfx, =>). ctrl-D
But got the error "native code procedure op/3 cannot be redefined (ignored)"
I also tried op(35, xfx, '=>'). and got the same error, and tried doing it without typing in [user]. first, but when I tried to actually use the operator I got an existence_error.
Upvotes: 3
Views: 1361
Reputation: 7493
yup you need to run the predicate instead of defining it. To do that just insert :-
before your op/3
call.
Upvotes: 5