Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compat Interval in Prolog

Status
Not open for further replies.

hidwulf

Programmer
May 3, 2004
1
FR
Hello,

I'm trying to use compact interval.

ex:

[1,2,3,4,5,6,7,8,9] -> [1...9]
[1,2,3,10,11,12,30] -> [1...3,10...12,30]

I search a way to decompact an interval in this way and to compact it, to do such operation as union, intersection etc.

ex : union([1...3,10,12],[4,12...13,],L) -> [1...4,10,12...13]

Please help is needed ... please help me i'm very in trouble with this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top