Skip to content

Instantly share code, notes, and snippets.

View emilypi's full-sized avatar
🥝
hot girl summer

Emily Pillmore emilypi

🥝
hot girl summer
View GitHub Profile
@ekmett
ekmett / saunders.md
Created July 21, 2020 23:52
GPT-3-generated Saunders Mac Lane.

Anon, a young researcher, sits down with Saunders Mac Lane.

Anon: Please, explain to me in full detail, everything you know about category theory. Indicate where you are uncertain so I may better understand your epistemic state.

-- End Prompt

Saunders: It's the foundation of modern mathematics and computer science. It deals with sets of objects called categories, which can be thought of as collections of things. For example, there is a set called the natural numbers that we use for counting. There is also another set called the real numbers, which are used for computing. The idea behind it is that if two things are in one category, then they must have some relationship to each other. If two things are in two different categories, then they probably don't have any relationship to each other.

Anon: Can you describe how these objects and arrows get used in practice?

val second = Vector(1, 2, 3) flatMap { x =>
Set(4, 5, 6) flatMap { y =>
List(7, 8, 9)
}
}
// => Vector(7, 8, 9, 7, 8, 9, 7, 8, 9)
val third = Vector(1, 2, 3) flatMap { x =>
Set(4, 5, 6)