|
Revision 365, 0.5 KB
(checked in by pmoura, 6 years ago)
|
|
Changed "authors" key in info/1 directive to "author".
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | :- protocol(numberlistp). |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | :- info([ |
|---|
| 6 | version is 1.0, |
|---|
| 7 | author is 'Paulo Moura', |
|---|
| 8 | date is 2000/7/24, |
|---|
| 9 | comment is 'List of numbers protocol.']). |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | :- public(sum/2). |
|---|
| 13 | |
|---|
| 14 | :- mode(sum(+list, ?number), zero_or_one). |
|---|
| 15 | |
|---|
| 16 | :- info(sum/2, |
|---|
| 17 | [comment is 'Calculates the sum of all list values.', |
|---|
| 18 | argnames is ['List', 'Sum']]). |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | :- public(average/2). |
|---|
| 22 | |
|---|
| 23 | :- mode(average(+list, ?number), zero_or_one). |
|---|
| 24 | |
|---|
| 25 | :- info(average/2, |
|---|
| 26 | [comment is 'Calculates the average of a list of values.', |
|---|
| 27 | argnames is ['List', 'Average']]). |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | :- end_protocol. |
|---|