From jpar@aegean.gr Thu May  3 16:59:58 2001
Received: from eupalinos.samos.aegean.gr (eupalinos.aegean.gr [195.251.160.12])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f43Exv300962
	for <prolog@swi.psy.uva.nl.>; Thu, 3 May 2001 16:59:57 +0200 (MET DST)
Received: by eupalinos.aegean.gr with Internet Mail Service (5.5.2653.19)
	id <2WSTG2W8>; Thu, 3 May 2001 17:59:43 +0300
Message-ID: <81FBBA8C21B9D311A6E500508B6144AA12018C@eupalinos.aegean.gr>
From: Partsakoulakis Ioannis <jpar@aegean.gr>
To: "'prolog@swi.psy.uva.nl.'" <prolog@swi.psy.uva.nl>
Date: Thu, 3 May 2001 17:59:40 +0300 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain
Subject: [SWIPL] sorting database?

Assume that I have the facts
on(1,2).
on(1,4).

Now I want to assert the fact on(1,3) but also to keep my database
sorted, i.e. I want to have
on(1,2).
on(1,3).
on(1,4).

Is this possible?

If not how can I retrieve efficiently the fact on(X,Y) such that Ys are
returned in increasing order?

Thanks,
Yannis.

