hmemcpy / milewski-ctfp-pdf

Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source
https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
Other
10.84k stars 575 forks source link

Possibly a mistake that causes confusion #285

Closed NariyasuHeseri closed 2 years ago

NariyasuHeseri commented 2 years ago

Screenshot_20220225-013554

On page 349 (see the screenshot), shouldn't Store f :: s -> Store f s be Store f :: s -> Store (s -> a) s? The expression on the right-hand side of :: is a type and apparently f is a value with type s -> a.

BartoszMilewski commented 2 years ago

The notation might be a bit confusing. What it says is that the type of the two expressions is the same. And a lambda would make it clrearer:

Store f ~ \s -> Store f s

NariyasuHeseri commented 2 years ago

The notation might be a bit confusing. What it says is that the type of the two expressions is the same. And a lambda would make it clrearer:

Store f ~ \s -> Store f s

Thanks!