Composable Transformations of Observable Collections
summary
A Swift library implements composable observables for scalars, observable arrays, and sets, producing fine-grained array change diffs that drive animated UICollectionView updates incrementally. It exposes pull and push-based API hooks, supports map/filter/concat, observable predicates that subscribe to elements, and reversible changes that apply to collection views. The code runs in production for a year but is prototype quality: ~60% test coverage and a currently broken build. Performance relies on advanced index structures (B-tree style) for non‑linear filtering.
AI-written summary · about
chapters (20)
- 0:00Introduction to UI Kit
- 1:04Problem of document list
- 7:08Limitations of pure functions
- 9:16Transforming input parameters
- 10:20Defining observable values
- 14:53Observable type protocol
- 16:20Observable scalar values
- 18:48Mapping observables
- 19:30Combining observables
- 22:46Observable arrays
- 26:42Array transformations
- 29:58Applying to original problem
- 33:13Animating collection view changes
- 34:19Functional programming with mutation
- 36:30Code quality and availability
- 37:23Q&A on array replacements
- 38:30Q&A on filtering dependencies
- 39:59Q&A on performance solutions
- 41:04Q&A on filtering implementation
- 42:12Closing and thanks
