dragonwasrobot / learn-prolog-now-exercises

My solutions to the exercises and practical sessions of the book 'Learn Prolog Now!' by Patrick Blackburn, Johan Bos, and Kristina Striegnitz.
288 stars 81 forks source link

chapter-11 subset problem #52

Open lengyijun opened 3 years ago

lengyijun commented 3 years ago
cd chapter-11 
swipl  practical-session.pl  
powerset([a,b,c,d,e],P).
P = [[], [a], [a, b], [a, b, c], [a, b, c, d], [a, b, c|...], [a, b|...], [a|...], [...|...]|...].