Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is one good reason to learn functional programming. Functional programming is all about algorithms and the algorithms are generally laid bare to be easily seen (rather than hidden in the noise of syntax). I have found that being taught functionally programming gave me a firm footing in reasoning about algorithms.

For instance: I can write a sort in any language because I carry this little gem around in my head:

  quicksort []     = []
  quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater)
      where
          lesser  = filter (< p) xs
          greater = filter (>= p) xs
Bird & Wadler is a great introduction to functional programming as well as algorithms and efficient data structures.

http://www.amazon.com/Introduction-Functional-Programming-In...

(blimey, I had no idea my old copy was now so valuable!)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: