|
Revision 4662, 1.3 KB
(checked in by pmoura, 5 days ago)
|
|
Updated copyright notice.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | ================================================================ |
|---|
| 2 | Logtalk - Open source object-oriented logic programming language |
|---|
| 3 | Release 2.35.0 |
|---|
| 4 | |
|---|
| 5 | Copyright (c) 1998-2009 Paulo Moura. All Rights Reserved. |
|---|
| 6 | Logtalk is free software. You can redistribute it and/or modify |
|---|
| 7 | it under the terms of the "Artistic License 2.0" as published by |
|---|
| 8 | The Perl Foundation. Consult the "LICENSE.txt" file for details. |
|---|
| 9 | ================================================================ |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | To load this example and for sample queries, please see the SCRIPT.txt file. |
|---|
| 13 | |
|---|
| 14 | This example shows the use of meta-predicates in Logtalk. Meta-predicates are |
|---|
| 15 | predicates whose head contains arguments that will be called as goals in the |
|---|
| 16 | body of the predicate definition. |
|---|
| 17 | |
|---|
| 18 | This example defines the following objects: |
|---|
| 19 | |
|---|
| 20 | sort(_) |
|---|
| 21 | this is a parametric object containing a method that implements the |
|---|
| 22 | quicksort sorting algorithm; the parameter is interpreted as the type |
|---|
| 23 | of the elements being sorted |
|---|
| 24 | |
|---|
| 25 | tracer |
|---|
| 26 | this object implements a meta-predicate that is used by sort(_) to |
|---|
| 27 | trace the sorting algorithm steps |
|---|
| 28 | |
|---|
| 29 | metapreds |
|---|
| 30 | descendant |
|---|
| 31 | test |
|---|
| 32 | objects used for illustrating the use of clusures as meta-arguments |
|---|
| 33 | |
|---|
| 34 | predicates |
|---|
| 35 | object defining some predicates for testing meta-predicates defined |
|---|
| 36 | in the Logtalk library |
|---|