root/trunk/examples/modules/list.lgt
| Revision 4601, 158 bytes (checked in by pmoura, 7 weeks ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | :- module(list, [contained/2, notcontained/2]). |
| 2 | |
| 3 | contained(H, [H| _]). |
| 4 | contained(H, [_| T]) :- |
| 5 | contained(H, T). |
| 6 | |
| 7 | notcontained(H, L) :- |
| 8 | \+ contained(H, L). |
Note: See TracBrowser
for help on using the browser.
