What's a good beginning text on functional pro

2019-03-07 13:16发布

I like to study languages outside my comfort zone, but I've had a hard time finding a place to start for functional languages. I heard a lot of good things about Structure and Interpretations of Computer Programs, but when I tried to read through it a couple of years ago it just seemed to whiz over my head. I do way better with books than web sites, but when I visit the local book store the books on LISP look kind of scary.

So what's a good starting point? My goal is to be able to use a functional programming language to solve simple problems in 6 months or so, and the ability to move to more advanced topics, recognize when a functional language is the right tool for the job, and use the language to solve more problems over the course of 2-3 years. I like books that are heavy on examples but also include challenges to work through. Does such a thing exist for functional languages?

15条回答
做自己的国王
2楼-- · 2019-03-07 13:19

Try Real World Haskell. It's free online.

查看更多
3楼-- · 2019-03-07 13:23

I feel Purely Functional Data Structures by Chris Okasaki is worth a look.

FYI http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf

查看更多
男人必须洒脱
4楼-- · 2019-03-07 13:23

If you have experience with .NET, Expert #F is good.

F# is derived from OCaml. Lisp is more pure as functional languages go.

查看更多
一夜七次
5楼-- · 2019-03-07 13:25

Since there are a bunch of different functional programming languages, it's hard to recommend books. But if you're interested in Common Lisp, recently I've been reading "Practical Common Lisp" by Peter Seibel, which you can check out online for free before dropping your hard earned cash on it. It's a pretty gentle introduction to CL, with great explanations and tons of examples. Seibel's a great writer (example: read the story of Mac,) he's good at keeping you engaged, which is really where SICP falls down, I think. It's just so dry! But while Practical Common Lisp is pretty example-heavy, it doesn't really have challenges to work through, although the examples are mostly designed to let you continue to work and build on them.

Another good book, this one Scheme-oriented: How to Design Programs. (Online) I haven't had as much time with this book, being more of a Lisper than a Schemer myself, but it's well written, has good explanations and examples, and has lots of exercises to work on. It seems pretty popular in the Scheme crowd.

查看更多
甜甜的少女心
6楼-- · 2019-03-07 13:25

Real-World Functional Programming (with examples in F# and C#)

查看更多
戒情不戒烟
7楼-- · 2019-03-07 13:26

I found The Little Schemer a great, great introduction to functional programming. It's entirely based on simple, bite sized examples which are built up upon as the book goes on.

查看更多
登录 后发表回答