1/3 Demystifying Codata (or coinduction):
In strict functional programming, we typically think about:
- Values (data): constructed upfront, directly visible, accessible
- Computations (functions): consume/destruct data, opaque
Codata flips this around:
- We define how to observe/destruct it
- Construction happens on-demand when observed (observed = selecting one of the methods in the object to call)