Jump to ratings and reviews
Rate this book

Learning Functional Programming in Go: Change the way you approach your applications using functional programming in Go

Rate this book
Function literals, Monads, Lazy evaluation, Currying, and more

Key FeaturesWrite concise and maintainable code with streams and high-order functionsUnderstand the benefits of currying your Golang functionsLearn the most effective design patterns for functional programming and learn when to apply each of themBuild distributed MapReduce solutions using GoBook DescriptionLex Sheehan begins slowly, using easy-to-understand illustrations and working Go code to teach core functional programming (FP) principles such as referential transparency, laziness, recursion, currying, and chaining continuations.

This book is a tutorial for programmers looking to learn FP and apply it to write better code. Lex guides readers from basic techniques to advanced topics in a logical, concise, and clear progression.

The book is divided into four modules. The first module explains the functional style of pure functional programming, manipulating collections, and using higher-order functions. In the second module, you will learn design patterns that you can use to build FP-style applications. In the next module, you will learn FP techniques that you can use to improve your API signatures, increase performance, and build better cloud-native applications. The last module covers Category Theory, Functors, Monoids, Monads, Type classes and Generics.

By the end of the book, you will be adept at building applications the FP way.

What you will learnLearn how to compose reliable applications using high-order functionsExplore techniques to eliminate side-effects using FP techniques such as curryingUse first-class functions to implement pure functionsUnderstand how to implement a lambda expression in GoCompose a working application using the decorator patternCreate faster programs using lazy evaluationUse Go concurrency constructs to compose a functionality pipelineUnderstand category theory and what it has to do with FPWho This Book Is ForThis book is for Golang developers comfortable with OOP and interested in learning how to apply the functional paradigm to create robust and testable apps. Prior programming experience with Go would be helpful, but not mandatory.

Table of ContentsPure Functional Programming in GoManipulating CollectionsUsing Higher Order FunctionsSOLID Design in GoAdding Functionality with DecorationBuilding on an Onion ArchitectureFunctional ParametersIncreasing Performance Using PipeliningIntro to Category Theory for Software DevelopersFunctors, Monoids, and Type ClassesMonadsAppendix

672 pages, Kindle Edition

Published November 24, 2017

21 people are currently reading
24 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
3 (25%)
4 stars
2 (16%)
3 stars
1 (8%)
2 stars
4 (33%)
1 star
2 (16%)
Displaying 1 - 2 of 2 reviews
370 reviews77 followers
November 21, 2022
I don't want to demotivate the Author, he is very intelligent and familiar with many areas, and I hope he keeps writing and will surely become a great writer.

Unfortunately this book was a rough start. I've probably read ~ 100 programming books over the years, and this was by far the worst.

The title is "Learning Functional Programming in Go" and I took that to mean "Learn to apply functional programming concepts in Go".

The catch is that Go isn't really a functional programming language. So rather than just focusing on what Go can do, and how in many situations functional programming concepts can improve your code performance or maintainability, we get 600 pages of complaints that Go isn't Haskell, that it still doesn't have Tail Call Optimization (to speed up recursive function calls) and no generics (though go does have generics now) and generally contrived, dull, and ugly examples of trying to shoehorn Haskell or other FP oriented thoughts directly into Go. And you also get a lot of Haskell code in case that's why you bought a Go book...

If you really want to master functional programming, you probably should learn about it in one of the languages best suited for FP like Haskell or Scala.

I also don't appreciate the fervor the author conveys on behalf of FP. There are many ways of thinking about and solving each problem. Ultimately even the not cost constrained solution is a balance of 1) code readability 2) code extensibility 3) performance. You choose the right tool and the right paradigm for the job. Unfortunately the author is so focused on making us into FP Zealots, he fails completely at showing us classes/types of real world problems where procedural or object oriented paradigms perform better, thus we end the book not knowing where FP concepts are really most applicable in Go.
Displaying 1 - 2 of 2 reviews

Can't find what you're looking for?

Get help and learn more about the design.