Closed mikehaertl closed 8 years ago
Thanks! Yeah, I'll definitely have to work both type constraints and f a
into the signature chapter.
To elaborate here: f a
simply means functor
with an a
in it like Maybe("test")
or IO(2)
.
Mathematically, f a
should mean the functor f
applied to the type a
, and the result is the new type. Now replace types by objects and you get the exact maths definition (https://en.wikipedia.org/wiki/Functor)
In chapter 8 I found this type signature:
While the introductory chapter on Hindley-Milner was easy to follow, I think it doesn't cover the above signature. The problem is the
f a
andf b
part. What does that mean?f
multiplied bya
? Orf
applied toa
? Or something else? Maybe you could elaborate on this a little.Oh, and by the way, thanks for your impressive work so far. It's a joy to read and I like how concise you present the main principles.