Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
next eleemnt in set
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-02-13 (08:36)
From: tmp123 <tmp123@m...>
Subject: next eleemnt in set

Thanks for your time.

I'm wondering which abstract type (set, map, ...) is the most useful to 
implement the following 3 methods: given a set of values, that are 
unique and ordered (it exists a "compare" function), it is necessary, in 
addition to the "add" and "remove element" methods, to have a "next" 
method. The next method takes as parameter one element of the set, and 
must return the immediatelly next element of the set, according to the 
provided compare function.

Please, have someone any suggestion?

Thanks again.