Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of Introduction to functional programming

    Introduction to functional programming

    Bird, Richard · 1988

    This is a thorough introduction to the fundamental concepts of functional programming.The book clearly expounds the construction of functional programming as a process of mathematical calculation, but restricts itself to the mathematics relevant to actual program construction. It covers simple and abstract datatypes, numbers, lists, examples, trees, and efficiency. It includes a simple, yet coherent treatment of the Haskell class; a calculus of time complexity; and new coverage of monadic input-output.

    Lisp & FunctionalProgramming
    Open LibraryAmazon
    Stats for nerds
    7recommend
    10mentions
    9people
    2010–2025years
    80% recommend20% neutral

    Mentions per year

    201020122014201620182020202220242025

    What Hacker News says

    1. qbitJul 2021
      If you can find a copy, the first edition of ‘Introduction to Functional Programming’ by Richard Bird covers the concepts of functional programming in a language-agnostic way.
      thread
    2. leozhangJun 2017
      Introduction to functional programming 1st edition by Richard Bird
      thread
    3. futtetennistaDec 2016
      Another (old) gem that I feel like suggesting to anyone interested in this topic is 'Introduction to Functional Programming' by Philip Wadler and Richard Bird, which is also available online for free:

      https://usi-pl.github.io/lc/sp-2015/doc/Bird_Wadler.%20Intro...

      thread
    4. pashOct 2016
      > Are they talking about the same thing here?

      Yes, they're talking about roughly the same thing. The kernel of the idea is called "equational reasoning", which exploits the key mathematical characteristic of functional programs, that they are referentially transparent [0].

      > Also, are there advantages to having such an algebra of programs outside of correctness verification?

      Proving correctness is a big one, but you can also use these techniques to derive more sophisticated algorithms from a naive (but correct) first implementation. For an example, see section 4 on the implementation of an efficient minimax algorithm in a short paper by Richard Bird [1]. (You will have to read some of the previous sections to understand the example.)

      If that piques your interest, Bird's introductory book on functional programming written with Philip Wadler [2] introduces the technique, which is usually called "program calculation". (Though published in 1988, their book remains a great introduction to functional programming.) If you really want to go off the deep end, Jeremy Gibbons's extensive lectures notes, published as a book chapter [3], are the best source I know. (Beware: here be category theory.)

      0. https://en.m.wikipedia.org/wiki/Referential_transparency

      1. R. Bird (1988), "Algebraic identities for program calculation", http://comjnl.oxfordjournals.org/content/32/2/122.full.pdf [PDF]

      2. R. Bird and P. Wadler (1988), Introduction to Functional Programming. It's out of print and hard copies are scarce, but a scan is available at https://usi-pl.github.io/lc/sp-2015/doc/Bird_Wadler.%20Intro... [PDF]

      3. J. Gibbons (2002), "Calculating Functional Programs, http://www.cs.ox.ac.uk/jeremy.gibbons/publications/acmmpc-ca... [PDF]

      thread
    5. pashNov 2014
      The author's definition of foldr is wrong, which makes the post pretty much impossible to understand if you don't already know what it's trying to say.

      The correct definition, in the author's style, is

          foldr :: (a -> b -> b) -> b -> [a] -> b
          foldr f = go
            where
              go z (x:xs) = f x (go z xs)
              go z []     = z
      
      It's better written with the cases for go reversed, so the base case comes first, or without the helper function at all, as

          foldr :: (a -> b -> b) -> b -> [a] -> b
          foldr f z [] = z
          foldr f z (x:xs) = f x (foldr z xs)
      
      But I suppose that if you're reading this then you already knew that. I'm really writing because I noticed that this submission, like another submission that made the front page of HN twice in the past two days [0], touches on the same material as Ch. 6 of Richard Bird and Philip Wadler's book Introduction to Functional Programming [1], which I happened to be re-reading a couple of nights ago. And I want to tell you to go read it.

      Really, if you find this sort of thing interesting, you should read it. The book isn't strictly a Haskell book—it was published in 1988, just as Haskell's designers (the book's authors among them) were getting going. But their book remains one of the best, most timeless introductions to programming in a lazy functional language. It's written in a sort of functional pseudo-code (which Haskell aspires to be) and captures all of the excitement and optimism of the coming of age of functional programming in the years after Miranda.

      Bird and Wadler's book is quite different from standard contemporary recommendations like Learn You a Haskell for Great Good; it's more like an extended version of John Hughes's famous paper Why Functional Programming Matters [2], which is to say that it makes the case for functional programming over imperative programming and illustrates the strengths of lazy evaluation. The book continues on from the basics to discuss evaluation strategies, efficiency, and other practical mid-level topics in some depth, without breaking stride; it doesn't touch much of the algebraic or categorical underpinnings of Haskell, which is the relative strength of an introduction like Learn You. That makes the two together a great one-two punch for learning Haskell.

      0. https://news.ycombinator.com/item?id=8645292

      1. http://www.nlda-tw.nl/janmartin/vakken/TFIT/Extra%20materiaa... [PDF]

      2. http://worrydream.com/refs/Hughes-WhyFunctionalProgrammingMa... [PDF]

      thread
    6. fredyrMay 2014
      Richard Bird, Philip Wadler - Introduction to Functional Programming http://www.amazon.com/Introduction-Functional-Programming-In...

      Richard Bird - Pearls of Functional Algorithm Design http://www.amazon.com/Pearls-Functional-Algorithm-Design-Ric...

      Christian Queinnec - Lisp in Small Pieces http://www.amazon.com/Lisp-Small-Pieces-Christian-Queinnec/d...

      thread

    Related

    Cover of Introduction Functional Programming
    2014–2021

    Introduction Functional Programming

    Richard Bird
    7 recommend · 8
    Cover of Pearls of functional algorithm design
    2011–2024

    Pearls of functional algorithm design

    Bird, Richard
    17 recommend · 29
    Cover of Practical Common Lisp
    2007–2026

    Practical Common Lisp

    Peter Seibel
    218 recommend · 400
    Cover of On LISP
    2007–2026

    On LISP

    Paul Graham
    192 recommend · 533
    Cover of Structure and Interpretation of Computer Programs
    2007–2026

    Structure and Interpretation of Computer Programs

    Harold Abelson
    347 recommend · 761
    Cover of Real-world functional programming
    2009–2023

    Real-world functional programming

    Tomas Petricek
    12 recommend · 19
    Cover of Lisp in Small Pieces
    2007–2026

    Lisp in Small Pieces

    Christian Queinnec
    101 recommend · 246
    Cover of The Implementation of Functional Programming Languages
    2008–2026

    The Implementation of Functional Programming Languages

    Simon L. Peyton Jones
    22 recommend · 44