|
Revision 4601, 502 bytes
(checked in by pmoura, 7 weeks ago)
|
|
Added svn:mime-type property to source files (set to text/x-logtalk).
|
-
Property svn:mime-type set to
text/x-logtalk
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | |
|---|
| 2 | :- object(object). |
|---|
| 3 | |
|---|
| 4 | :- info([ |
|---|
| 5 | version is 1.0, |
|---|
| 6 | author is pm, |
|---|
| 7 | date is 2008/4/9, |
|---|
| 8 | comment is 'Simple example of using compilation hooks and term expansion for conditional compilation of debug statements.']). |
|---|
| 9 | |
|---|
| 10 | :- public(append/3). |
|---|
| 11 | |
|---|
| 12 | append([], List, List) :- |
|---|
| 13 | debug((write('Base case: '), writeq(append([], List, List)), nl)). |
|---|
| 14 | append([Head| Tail], List, [Head| Tail2]) :- |
|---|
| 15 | debug((write('Recursive case: '), writeq(append(Tail, List, Tail2)), nl)), |
|---|
| 16 | append(Tail, List, Tail2). |
|---|
| 17 | |
|---|
| 18 | :- end_object. |
|---|