按年被提到
20172018 · 7 次2026
开源书›语言实现与理论·No.73·简称 CTFP

Category Theory for Programmers

程序员的范畴论
Bartosz Milewski

从程序员视角讲范畴论,用 Haskell 与 C++ 举例

免费阅读 ↗
被推荐 · 22 人首次 2017-09-30 · 最近 2026-07-14许可证 CC BY-SA 4.0
22不同的人
19活跃月份
10有推荐的月份
23讨论串

Bartosz Milewski 把自己的博客系列整理成书,从程序员熟悉的类型和函数出发,讲范畴、函子、自然变换、单子(monad)等范畴论概念。示例使用 Haskell 和 C++,并配有课程视频;书由作者和社区持续更新,还出现了其他语言的版本。和偏纯数学的范畴论教材相比,它更强调组合与抽象在编程中的意义。

HN 为什么推荐它

HN 上的人把它当作程序员学范畴论最好的免费入门之一,称作者是好老师,讲清了函子、单子等概念,也有人说它比别的入门更好地解释了 Haskell 背后的思想。

难度 4 / 5约 50 小时开放许可
适合谁

想理解函数式编程背后数学的程序员

读之前最好知道
1Haskell 基础
2C++ 模板(templates)
3函数式编程概念

怎么读

由 Claude 根据这本书和 HN 上的说法整理,可能有错
  1. 1配合作者的课程视频一起看,效果更好
  2. 2前几章先把范畴、组合的直觉建立起来
  3. 3示例以 Haskell 为主,不会也可边读边学语法
  4. 4做书里的练习,卡住就先跳过再回头

HN 书评

推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算
强烈推荐louthy · 2018-10

“I also heartily recommend this. I've been watching the videos whilst ploughing through the PDF book version [1] on my Kindle. He really is a very good teacher.”

极力推荐,边看视频边读 PDF,称作者是好老师
An invitation to category theory原评论 ↗
推荐louthy · 2018-10

“I like Bartosz Milewski's introduction [1][2]”

推荐 Milewski 的范畴论入门
An invitation to category theory原评论 ↗
推荐bmc7505 · 2018-10

“Also recommend checking out Bartosz Milewski's "Category Theory for Programmers": Category Theory for Programmers”

推荐它,用来补自动微分背后的范畴论背景
The Simple Essence of Automatic Differentiation [pdf]原评论 ↗
推荐raphinou · 2018-12

“The pdf generated from his blog is also interesting:”

称由 Milewski 博客生成的 PDF 也值得一看
Learn Prolog Now原评论 ↗
推荐ghuntley · 2018-12

“Re: math, composition and universal abstractions Folks please read Category Theory for Programmers”

请大家读它,了解组合与通用抽象的数学
Ask HN: What has Haskell ever done for us?原评论 ↗
推荐xyzal · 2020-06

“Also, the accompanying book is well written (and free)!”

称配套的书写得好且免费
Ask HN: What kind of math do you study in your free time?原评论 ↗
看全部 18 条 →
推荐vrnvu · 2020-07

“Also I personally recommend to take a look to this series before diving into his great introductory book about category theory [1].”

推荐先看这个系列,再读 Milewski 的范畴论入门书
Basics of Haskell – Code and exercises原评论 ↗
推荐ABS · 2021-09

“Milewski's free book Category Theory for Programmers is a "classic" as well Category Theory for Programmers”

称它是免费的“经典”
Infinity Category Theory Offers a Bird’s-Eye View of Mathematics原评论 ↗
推荐zzhelezc · 2022-01

“Another category theory resource you may find interesting is Category theory for programmers by Bartosz Milewski.”

推荐为另一个值得看的范畴论资源
Ask HN: Solving problems by mapping to other problems that we know how to solve原评论 ↗
推荐rssoconnor · 2022-12

“if I had to guess at what would be effective at getting up to speed without spending 25 years, would be to checkout Category Theory for Programmers Category Theory for Programmers.”

推荐想不花 25 年快速入门时看它
Why I am learning category theory原评论 ↗
推荐louthy · 2024-01

“Category Theory for Programmers [1] covers monoids (and other concepts).”

说它讲了 monoid 等概念
A Core Calculus for Documents [pdf]原评论 ↗
推荐codethief · 2024-07

“I found it did a much better job at explaining Haskell to me than any other introduction I read before.”

称它讲 Haskell 比读过的其他入门都好
Ask HN: What resources do you recommend for learning Haskell?原评论 ↗
推荐Krei-se · 2024-10

“I still would vote to learn it from Milewski though.”

仍然投票选择跟 Milewski 学范畴论
Category Theory Illustrated: Logic (2021)原评论 ↗
推荐louthy · 2025-08

“Bartosz Milewski's Category Theory for Programmers lectures [1] are good. Especially paired with his book [2].”

推荐 Milewski 的讲座,搭配这本书效果更好
Why is it worth spending time on type theory? (2013)原评论 ↗
引用xvilka · 2019-07

“Seems a good time for adding a Julia flavor for Category Theory for Programmers[1] book.”

说该为这本书加一个 Julia 版
Catlab.jl: Experimental framework for applied category theory原评论 ↗
引用a1369209993 · 2019-12

“Or direct[-ish] link to TFA's PDF: Category Theory for Programmers”

给出文章所讲那本书的 PDF 版本
Category Theory for Programmers (2014) [pdf]原评论 ↗
引用xvilka · 2019-12

“The book itself is constantly updated by the author and community, people add particular language flavors.”

说该书由作者和社区持续更新,大家加入各语言版本
Category Theory for Programmers (2014) [pdf]原评论 ↗
引用lioeters · 2026-07

“In a different comment thread, someone mentioned the book, Category Theory for Programmers. Here's the Releases page with PDF files”

说有人提到这本书,并给出含 PDF 的 Releases 页面
Actegories原评论 ↗
被提交为 story · 8 次