?- time(( zebra(Z,HS), (maplist(length,HS,_) -> maplist(sort,HS,S), maplist(writeln,S),nl,writeln(Z)), false ; writeln('No More Solutions'))). [color-yellow,drink-water, nation-norwegian, owns-cats, smoke-Dunhill ] [color-blue, drink-tea, nation-dane, owns-horse, smoke-Blend ] [color-red, drink-milk, nation-englishman,owns-birds, smoke-Pall Mall ] [color-green, drink-coffee,nation-german, owns-zebra, smoke-Prince ] [color-white, drink-beer, nation-swede, owns-dog, smoke-Blue Master] german No More Solutions % 263,486 inferences, 0.047 CPU in 0.063 seconds (74% CPU, 5630007 Lips)