Recommended for you

Our recommendation engine has come up with some personalized suggestions for you.

Discover more products

    Is this your street address?

    Card

    ···· ···· ···· 4242
    Test card

    05/18

    Card

    Use a different card?

    Card

    pp paypal

    or pay with

    We do not keep any of your sensitive credit card information on file with us unless you ask us to after this purchase is complete.

    or pay with

    Please confirm your location:
    Your card will be charged .

    Thank you!

      Gumroad Library

      Download from the App Store or text yourself a link to the app

      Download from the App Store or text yourself a link to the app

      Send SMS
      Nevermind

      $25

        Functional Programming, Simplified

        Functional Programming, Simplified

        The regular price of this book is $35. It’s currently on sale for $25.

        Note: The previous name of this book was “Learning Functional Programming in Scala.”


        Reader comments

        A few comments from readers of this book:

        • “Your book is fantastic, I can’t find enough words to thank you”
        • “Best Scala book I’ve read”
        • “Congratulations on your book, it helped me solve questions I had about FP”
        • “Masterpiece!”
        • “Best ... book ... ever“


        Introduction

        Hi, my name is Alvin Alexander. I wrote the Scala Cookbook for O’Reilly, and this is my new book about functional programming (FP).

        When I first started trying to learn about FP in Scala, I struggled — a lot. Because Scala/FP developers use many advanced language features all at the same time, it took me a long time to break through that learning barrier. The only way I was finally able to understand FP was to break their code down into smaller chunks until I could understand each concept. When I finally broke through what turned out to be many barriers, I decided to turn my notes into a book that could help other people understand functional programming.

        As just one small example of the “barriers” I’m talking about, when I first started learning FP I came across this code, which was introduced with the words, “it’s very easy to access and modify state”:


        def updateHealth(delta: Int): Game[Int] =
             StateT[IO, GameState, Int] { (s: GameState) =>
             val newHealth = s.player.health + delta
             IO((s.copy(player = s.player.copy(health = newHealth)), newHealth))
        }

        I don’t know about you, but the first time I saw that code, the word “easy” is not what came to mind. Among other things going on in that code, I had never written a type like “StateT[IO, GameState, Int]” and thought it was easy.

        In this book I explain all of the concepts that are used to write FP code in Scala. As I learned in my own experience, once you understand all of the small programming concepts, you can understand Scala/FP.

        Contents

        As the book progresses you’ll learn about:

        • the pros and cons of functional programming
        • why pure function signatures are much more important than OOP method signatures
        • how pure functions work with I/O (file, database, and network)
        • visual lessons on anonymous functions
        • lessons on recursion, with many images to help explain how it works
        • how the concepts of JVM stacks and stack frames work
        • partially-applied functions and currying
        • a thorough look at case classes and related topics like pattern matching
        • type signatures are covered many times, so you can get used to reading code like `StateT[IO,GameState,Int]`
        • the correct way to handle exceptions and null values
        • more than a dozen lessons on for-comprehensions
        • the meaning of FP terms like lambda, functor, monad, “monadic,” and algebraic data types (ADTs)

        • how to use the ScalaCheck “property testing” framework
        • monads like State and IO
        • monad transformers like StateT
        • domain modeling with Scala and functional programming
        • lenses
        • an introduction to type classes, including an example with the Cats library
        • concurrency lessons on Akka actors and Scala futures
        • visual lessons on collections’ methods like `fold` and `reduce`



        Notes

        The book is nearly complete, and now contains 126 small chapters and seven appendices. You’ll receive free updates to the PDF when new lessons are available.


        The new name

        The book was previously named “Learning Functional Programming in Scala,” and I renamed it to “Functional Programming, Simplified” on October 20, 2017. For people who buy the PDF version of the book here on Gumroad.com, the book is available under both the old and new names. A Kindle version of the book is now available under the new name at this URL: https://goo.gl/73mT5J


        Preview

        There are no refunds on digital products like this, but you can obtain a large, free preview of the book at this URL:

        http://alvinalexander.com/scala/fp-book/learning-functional-programming-in-scala

        Sorry, this item is not available in your location.
        Sold out, please go back and pick another option.

        You've already purchased this product.

        • Size 6.57 MB
        • Length 1020 pages

        Card

        ···· ···· ···· 4242
        Test card

        05/18

        Card

        Use a different card?

        Card

        pp paypal

        or pay with

        We do not keep any of your sensitive credit card information on file with us unless you ask us to after this purchase is complete.

        or pay with

        Please confirm your location:
        Your card will be charged US$25.

        Your rental will be available for 30 days. Once started, you’ll have 72 hours to watch it as much as you’d like!

        Thank you!

          Gumroad Library

          Download from the App Store or text yourself a link to the app

          Download from the App Store or text yourself a link to the app

          Send SMS
          Nevermind