views:

434

answers:

8

I'm looking for a good algorithms reference for functional programming. I have this book:

Introduction to Algorithms

but all the examples are written in a procedural pseudocode. It's a fantastic book, though!

I also have this one:

Purely Functional Data Structures

Although all the examples are in Standard ML and Haskell, it's not really a complete reference since it doesn't cover some of the "basic" algorithms such as sorting, list operations, permutations, and so forth.

Know of any good books that give examples using functional techniques?

Edit

Lots of great responses with books about functional programming. However, I'm looking for something that's more like the Corman book (Introduction to Algorithms): a compendium of functional algorithms. Maybe such a book doesn't exist...yet.

A: 

I use Introduction to Functional Programming by Richard Bird at University. I guess you already read it.

JuanZe
I haven't read it, but I ordered a used one and plan to dive into it some day.
Barry Brown
+1  A: 

Algorithms + Data Structures = Programs by Niklaus Wirth

...ancient, but a lot of good info.

Justin Niessner
Like the recommendation of Knuth's TAOCP: a good book, but not functional programming.
Bart Kiers
+1  A: 

How about Functional Programming for the Real World: With Examples in F# and C#

Functional Programming for the Real World: With Examples in F# and C#

Agusti-N
AAAHH!! Jon Skeet! He must be stopped, not only is he quick to the draw on SO but hes quick to the draw in the book world.
monksy
@steven, i see jon skeet faces in anywhere :P
Agusti-N
A: 

G'day,

You want basic algorithms, e.g. sorting, etc., then invest in Donald Knuth's masterpiece "The Art of Computer Programming" (Amazon link)

A lot of people have used that as their bible for a long time.

BTW Don't forget his latest extensions as well.

HTH

Rob Wells
Yes, an excellent work on algorithms, but not really functional.
Bart Kiers
A: 

Typically the Pseudo-code can be interpretative into either C# or Java on Wikipedia (look up the name of the algorithm). Also, it can't hurt to interpret the psuedo-code yourself. It'll give you more confidence in coding, and will assist in reinforcing how the algorithm works.

monksy
C# and Java arent functional languages. I think the problem here is not understanding the code, but getting a functional equivalent.
Benno
+4  A: 

I recommend SICP - Structure and Interpretation of Computer Programs. Available online and as a pdf. I'm not sure if it's a good algorithms book, but it's a must read functional book.

Jonas
A: 
  1. Structure and Interpretation of Computer Programs, Abelman and Sussman
  2. How to Design Programs, Felleisen et al.
  3. The Functional Approach to Programming, Cousineau and Mauny
Jason
+1  A: 

Algorithms: A Functional Programming Approach is a nice book that covers the basics, but I wouldn't dare compare it to Cormen et al.'s work.

Bart Kiers