<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hello,</div><div class=""><br class=""></div><div class="">It looks like you are looking for data structure called zipper. I’ve not used any of these but there is at least two versions of zippers for Erlang.</div><div class=""><br class=""></div><div class=""><a href="https://github.com/ferd/zippers" class="">https://github.com/ferd/zippers</a></div><div class=""><a href="https://github.com/inaka/zipper" class="">https://github.com/inaka/zipper</a></div><div class=""><br class=""></div><div class="">- Dmitry</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 8 Oct 2017, at 20.14, Benoit Chesneau <<a href="mailto:bchesneau@gmail.com" class="">bchesneau@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi all,<br class=""><br class="">I’m looking for a datastructure like a skiplist to maintain an ordered set of Key/Values. It has to have the following properties:<br class=""><br class="">* allows custom compare function to order the data in a specific order<br class="">* allows the user to iterate forward (next) and backward (prev) the data<br class=""><br class="">Has someone already written a lib that offers such datastructure? Or maybe we can add a `prev(Key) function to gb_tree? Any idea i welcome :)<br class=""><br class="">- benoit<br class="">_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></div></blockquote></div><br class=""></body></html>