root/trunk/examples/benchmarks/category.lgt

Revision 4601, 510 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:- category(category).
3
4    :- info([
5        version is 1.0,
6        author is 'Paulo Moura',
7        date is 2007/06/10,
8        comment is 'Defines a simple predicate for comparing performance of calls from within an object to imported category predicates.']).
9
10    :- public(ctg_pred/0).
11
12    ctg_pred :-
13        {generate_list(20, List)},
14        length(List, _).
15
16    length(List, Length) :-
17        length(List, 0, Length).
18
19    length([], Length, Length).
20    length([_| Tail], Acc, Length) :-
21        Acc2 is Acc + 1,
22        length(Tail, Acc2, Length).
23
24:- end_category.
Note: See TracBrowser for help on using the browser.