|
Revision 2, 353 bytes
(checked in by pmoura, 7 years ago)
|
|
Initial revision
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | :- object(natural, |
|---|
| 3 | extends(integer)). |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | :- info([ |
|---|
| 7 | version is 1.0, |
|---|
| 8 | authors is 'Paulo Moura', |
|---|
| 9 | date is 2000/7/24, |
|---|
| 10 | comment is 'Natural numbers data type predicates.']). |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | between(Lower, Upper, Integer) :- |
|---|
| 14 | integer(Lower), |
|---|
| 15 | Lower > 0, |
|---|
| 16 | ^^between(Lower, Upper, Integer). |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | valid(Natural) :- |
|---|
| 20 | integer(Natural), |
|---|
| 21 | Natural > 0. |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | :- end_object. |
|---|