Skip to Content
Learning Functional Programming in Go
book

Learning Functional Programming in Go

by Lex Sheehan
November 2017
Intermediate to advanced
670 pages
17h 35m
English
Packt Publishing
Content preview from Learning Functional Programming in Go

Reality check

What? A for loop? A mutating car variable? What gives? We must face the facts. The Go compiler does not provide TCO, so a recursive implementation is simply not practical. Perhaps Go 2.0 will provide a pure functional library with all our favorite HOFs as well as generics. Until then, we will make do with using the functional programming style as much as possible with a bit of imperative programming where necessary. Another option that we'll explore later is an execution system named Gleam, which provides pure Go mappers and reducers that provide high performance and concurrency.

Data transformations are so common that it's nice to have a shorthand for it. HOF's ability to simplify both writing and reading code that performs ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Functional Programming

Learning Functional Programming

Jack Widman

Publisher Resources

ISBN: 9781787281394Supplemental Content