sdiehl / write-you-a-haskell

Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)
MIT License
3.34k stars 256 forks source link

Some additions for clarification and minor changes #70

Closed samvher closed 8 years ago

samvher commented 9 years ago

I got confused in the beginning due to the different lambda notation, so I read up on wikipedia and found out there was actually no reason to be confused. Still I imagine it could happen to others so I would suggest the short additional paragraph at the beginning.

Also, I just noticed/found out that there is a strong relationship between the SKI combinators and Reader, i.e. that S is <*>, K is const/pure (and I is id/ask). And indeed const <*> const = id so SKK evaluates to I. Maybe this is interesting to mention? (I found it interesting. It's a bit unrelated, but might make people who have more experience with coding Haskell than with lambda calculus feel more familiar.)

I found the Y f = f(Y f) derivation a bit difficult to make in my mind, I think it would be good to show it.

That's it, thanks a lot for the tutorial, I'm finding it very interesting.

sdiehl commented 8 years ago

All looks good.