Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- is_packed(List):-is_packed(List,[]).
- is_packed([],_).
- is_packed([XNow,XNow|TODO],WhatIWontAllowoAgainList):- is_packed([XNow|TODO],WhatIWontAllowoAgainList).
- is_packed([XNow|TODO],WhatIWontAllowoAgainList):- \+ member(XNow,WhatIWontAllowoAgainList), is_packed(TODO,[XNow|WhatIWontAllowoAgainList]).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement