Capture the results of N backtracks

See:
Pure and correct Prolog - what is it? (Creating Prolog Cookbook)

Barry’s Prolog
Reference Manual & User Guide - While not a Cookbook, it does have many practical examples.

2 Likes