dadhi / XamlTea

The Elm Architecture for building .NET UI applications: WPF and more
MIT License
13 stars 1 forks source link

Consider Zipper data structure to represent children in virtual UI #6

Open dadhi opened 6 years ago

dadhi commented 6 years ago

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.