Currently I am using ImList, which is an mmutable list with cheap prepending, BUT the usual need in UI is to append to the end (bottom) of lists.
We may use Zipper with its inverted prefix up to the last "selected" element and empty suffix. This will allow constant time append. Plus bonus of having a selected (focused, etc.) element for free.
Currently I am using ImList, which is an mmutable list with cheap prepending, BUT the usual need in UI is to append to the end (bottom) of lists.
We may use Zipper with its inverted prefix up to the last "selected" element and empty suffix. This will allow constant time append. Plus bonus of having a selected (focused, etc.) element for free.