Cofree Comonads and their Uses
summary
Defines cofree comonads as a product type that annotates trees and streams and shows concrete encodings: stream = cofree over Identity, prefix list = cofree over Maybe. Implements a finite‑state machine for a blind auction as a cofree comonad, computes running medians via the store comonad for image blurs, and derives Merkle‑tree verification and a blockchain model where extend verifies the whole chain. Uses Haskell code, cofree comonad transformers, and practical type‑constraint tricks; slides linked in the description.
AI-written summary · about
chapters (12)
- 0:00Start
- 9:06Suffix Trees
- 9:53Merkle Trees
- 11:01Store
- 11:55Image Regions
- 14:58Cofree in Disguise
- 16:15Annotating DSLS
- 19:00Blind Auction Moore Machine
- 20:53Blind Auction Machine
- 23:46Comonad Transformers
- 25:27Cofree Comonad Transformer
- 26:15Blockchain as a Comonad
related talks
41mThe Free Monad by Example
45mRouting With Cofree Comonad
42mThe Monad and You
31mMONADS - CODING FUNCTIONALLY
59mBuilding an Intuition for Composition
01h 35mRecursion Schemes, Algebras, Finally Tagless, Data Types
46mFinite-state machines? Your compiler wants in!
34mThe circuit as a point-free general model of computation
