<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">hmm i forgot to mention i need to also lookup for the data so not sure if a zipper is designed for it. <div><br></div><div> I will have a loom kn the libs anyway, thanks for the links :)<br><br><div>- benoît</div><div><br>On 8 Oct 2017, at 19:33, Dmitry Kolesnikov <<a href="mailto:dmkolesnikov@gmail.com">dmkolesnikov@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><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=""><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br class=""></div></div></blockquote></div><br class=""></div></blockquote></div></body></html>