Computer Science, asked by sonu69797, 1 year ago

Disscuss cut and fail in prolog

Answers

Answered by sehangshu22
0

As its name suggests, fail/0 is a special symbol that will immediately fail when Prolog encounters it as a goal. That may not sound too useful, but remember: when Prolog fails, it tries to backtrack . Thus fail/0 can be viewed as an instruction to force backtracking.

Similar questions