Skip to content

Commit bf47c58

Browse files
committed
[ last week ]
1 parent e827831 commit bf47c58

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

lectures/Week10.agda

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
open import Data.Nat.Base using (ℕ; suc)
2+
open import Data.Product.Base as Prod using (_×_; _,_)
3+
open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂)
4+
open import Data.Unit.Base using (⊤)
5+
6+
open import Function.Base using (id)
7+
8+
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
9+
10+
variable
11+
X Y : Set
12+
13+
------------------------------------------------------------------------------
14+
-- Universe of descriptions
15+
16+
-- Desc
17+
18+
-- Example: Maybe
19+
20+
-- Meaning
21+
22+
-- Examples: nothing, just
23+
24+
25+
-- Meaning is functorial
26+
27+
28+
-- Example: mapping over just
29+
30+
31+
------------------------------------------------------------------------------
32+
-- Fixpoints of functors
33+
34+
-- Example: Nat as nested Maybes, zeros, and suc
35+
36+
37+
-- Algebras
38+
39+
-- example: addAlg replacing 0 with n
40+
41+
-- Folds over fixpoints
42+
43+
-- example: add as a fold
44+
45+
46+
-- example: run add (fromℕ/toℕ for readability?)

0 commit comments

Comments
 (0)