On Sat, Feb 7, 2009 at 4:27 PM, Jeff Wheeler <[email protected]> wrote: > > On Sat, 2009-02-07 at 10:13 +0100, Jean-Philippe Bernardy wrote: > >> Does it really support the "wrap around" that we use? > > Oh, good catch. I didn't notice that feature as I was reimplementing it, > because I didn't need it in the other project. > >> Maybe we should keep our module and implement it on the basis of >> the PointedList? > > I'm not sure what you mean. I think WindowSet could be rewritten using > PointedList as the base, and the "wrap around" could be implemented by > writing higher-level forward/backward (and a few others, I'm sure) > functions that pattern-matched the edge cases.
That's what I meant. > This has the added benefit of speed. Some of the functions (e.g. > backward in Yi.WindowSet) currently call reverse, init, last, etc. all > separately, in which a cached reversed list and pattern matching could > speed up the function (and PointedList makes those changes). > > I don't feel very strongly about this. What do you think? I'm all for moving code out of the Yi repository -- the details do not matter so much. Please go ahead when you feel comfortable about the change. Note that one has to be somewhat careful with the traversable/etc. instances, there were some checks that you can call with the --self-test flag. Cheers, JP. --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list [email protected] http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---
