25

Coming from a procedural/OO programming background, I tend to write Scheme programs in a procedural fashion. I would be intersted in learning Scheme or Lisp in a functional way from the ground up, to kind of reset my programmer's mind.

Is there a tutorial or book out there that's the de-facto standard for describing best practices, design methodologies, and other helpful information on functional programming concepts? What about that book makes it special?

Matthieu
  • 4,559
  • 2
  • 35
  • 37
Federico klez Culloca
  • 3,092
  • 24
  • 24
  • Check out [Land of Lisp](http://landoflisp.com/) and do all the exercises. – Sardathrion - against SE abuse Oct 12 '11 at 15:30
  • I'd start with http://www.ccs.neu.edu/home/matthias/BTLS/ Functional programming is more like pure math than OO programming. If you think of it that way it may help. – Brian Makin Sep 08 '10 at 22:34
  • If you prefer listening to reading, [SICP](http://mitpress.mit.edu/sicp/full-text/book/book.html) also has [video lectures](http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/). I am at lecture 6b now. :) – Dysaster Oct 04 '10 at 09:58

3 Answers3

15

Use it.

If you do functional programming daily, maybe smaller applications or exercises from books, then you will be better on it.

I have used it since the first programming lecture in university. At the beginning it was very hard, because it is so different, but now I prefer it to imperative programming.

If you are looking for a good book, I would recommend Real World Functional Programming: With Examples in F# and C# by Tomas Petricek and Jon Skeet

Robert Harvey
  • 198,589
  • 55
  • 464
  • 673
Jonas
  • 14,867
  • 9
  • 69
  • 102
12

The book I always see recommended when talking about Scheme or Lisp is The Structure and Interpretation of Computer Programs. It's freely available on that website, and I think it's provided as a PDF if you search around.

I've been meaning to work through it, but I'm not sure when I'll get the time. I can't comment on how good the book actually is, though. But it's been recommended by multiple people, so I'm guessing its pretty good.

If you are interested in other functional programming languages, I've been told that it's rather easy to do the exercises in languages like Haskell or F#. I think there's also a blogger who is working through SICP using Haskell and posting his solutions to the exercises, but I can't find the link right now.

EricC
  • 103
  • 5
Thomas Owens
  • 79,623
  • 18
  • 192
  • 283
  • Who is Bill the Lizard http://www.billthelizard.com/ for 500 please. Although I think he's using scheme. – Brian R. Bondy Sep 07 '10 at 14:58
  • +1 for SICP. I've been working through parts of it with Clojure, as long as you're willing to do a bit of mental gymnastics I think it would work for any Lisp-like or functional language. – mikera Feb 24 '11 at 14:16
  • 2
    There's also *[How to Design Programs](http://HtDP.Org/)*, which was specifically designed to address some shortcomings in SICP, which are outlined in the very approachable and cleverly titled paper *The Structure and Interpretation of the Computer Science Curriculum*. – Jörg W Mittag Sep 11 '11 at 04:27
  • Yes, I'd agree with [SICP](http://mitpress.mit.edu/sicp/) being an excellent book to learn FP in Scheme. If you aren't married to Scheme, but would consider learning Haskell then [Real World Haskell](http://www.realworldhaskell.org/blog/) is an excellent read too. – Magnus Oct 04 '10 at 09:35
-2

Try to learn some math and get adapted to it's style. What are functions? What is a variable? How do variables different from constants and how do they not?

Antsan
  • 47
  • 5
  • That does not really answer the question which is more about where to find answers to the questions you are providing. – Matthieu Dec 16 '11 at 01:45