开发者

Seeking Functional Programming Lexicon

Knowing the argot of a field helps me a lot, especially since it allows me to converse intelligently with those who know a lot more than I, so I would like to find a good lexicon of Functional Programming terms.

E.g., I repeatedly encounter these: Functor, Arrow, Category, Kleisli, Monad, Monoid, a veritable zoo of Morphisms, etc. I also notice many of these appear with prefixes such as "covariant", "co-", "endo-" etc.

Of these, I can say I actually understand Monoid and Covariant and sort of开发者_StackOverflow get Monad, but the rest are still gibberish to me. (Note that I don't mean this list as exhaustive and I'm not looking to have these defined or described for me here, I'm looking for learning resources.)

Can someone point me towards an FP lexicon? It need not be on-line, as long as it's possible to find it (and it's not a rare volume for which I'd have to pay many tens of dollars).


As other answers have pointed out, to really understand those terms you have to study Category Theory. However, Category Theory is very abstract and may not help you build up intuition immediately. To see the abstract concepts in action, I highly recommend the Typeclassopedia (PDF) (blog announcement).


These aren't functional-programming terms; they're terms from Category Theory. It's true that a handful of elite functional programmers seem to use category theory to get insights into functional programming (Conal Elliott, Ralf Hinze, Chung-Chieh Shan, phone your office), but these people are in the minority. Regarding these terms, I struggled with Pierce's book but I don't know a better source—although Dan Piponi has a lot of related material on his blog; I encourage you to look there. (2012 update: Harold Simmons has a new book on category theory that looks quite good, and it was very well reviewed by Computing Reviews [behind a paywall]. The only complaint is that the examples are all from math and not from computing.)

Some words you might hear from functional progammers: "map function", "fold function", "higher-order function", "point-free programming", "sum type", "product type", "catamorphism", "Church encoding", "calculating programs", "type-directed programming", "proper tail call", "accumulating parameter". I don't know of a good lexicon gathered in one place. Graham Hutton's book Programming in Haskell might be a place to start, or the older book by Richard Bird and Phil Wadler.


Many of the terms you used as example are from Category Theory, and the best resource I know in the circumstances is Benjamin Pierce's "Basic Category Theory for Computer Scientists"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜