This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/examples/metapredicates/SCRIPT
pmoura d494081bc5 Logtalk 2.16.0 release files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1014 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2004-03-03 04:07:59 +00:00

49 lines
1.2 KiB
Plaintext

=================================================================
Logtalk - Object oriented extension to Prolog
Release 2.16.0
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
=================================================================
% note that "user" is a pseudo-object representing the Prolog database
% this implies that the integer comparisons are done using the standard
% Prolog built-in predicates
| ?- sort(user)::sort([3, 1, 4, 2, 9], Sorted).
call: partition([1,4,2,9],3,_358,_359)
exit: partition([1,4,2,9],3,[1,2],[4,9])
call: sort([1,2],_740)
call: partition([2],1,_967,_968)
exit: partition([2],1,[],[2])
call: sort([],_1300)
exit: sort([],[])
call: sort([2],_1539)
call: partition([],2,_1765,_1766)
exit: partition([],2,[],[])
call: sort([],_2093)
exit: sort([],[])
call: sort([],_2332)
exit: sort([],[])
exit: sort([2],[2])
exit: sort([1,2],[1,2])
call: sort([4,9],_2831)
call: partition([9],4,_3058,_3059)
exit: partition([9],4,[],[9])
call: sort([],_3391)
exit: sort([],[])
call: sort([9],_3630)
call: partition([],9,_3856,_3857)
exit: partition([],9,[],[])
call: sort([],_4184)
exit: sort([],[])
call: sort([],_4423)
exit: sort([],[])
exit: sort([9],[9])
exit: sort([4,9],[4,9])
Sorted = [1,2,3,4,9] ?
yes