In-memory CRUD that mirrors Core Data ideas (entities, identity, queries) with a clean controller layer. Runs anywhere (even online Swift runners).
- Models.swift —
TodoItementity + display helpers - TodoStore.swift — store protocol + in-memory store
- TodoController.swift — business logic (add, toggle, list)
- main.swift — small demo that prints the list
Use an online Swift runner. Paste all four files into one editor pane in this order:
- Models.swift
- TodoStore.swift
- TodoController.swift
- main.swift
Then click Run and copy your output below.
All:
[x] Buy groceries
[ ] Study Swift