Learning Functional Programming in Go: Change the way you approach your applications using functional programming in Go
暫譯: 在 Go 中學習函數式程式設計:改變您使用函數式程式設計開發應用程式的方式
Lex Sheehan
- 出版商: Packt Publishing
- 出版日期: 2017-11-24
- 售價: $2,010
- 貴賓價: 9.5 折 $1,910
- 語言: 英文
- 頁數: 672
- 裝訂: Paperback
- ISBN: 1787281396
- ISBN-13: 9781787281394
-
相關分類:
Go 程式語言、程式語言
海外代購書籍(需單獨結帳)
商品描述
Key Features
- Write concise and maintainable code with streams and high-order functions
- Understand the benefits of currying your Golang functions
- Learn the most effective design patterns for functional programming and learn when to apply each of them
- Build distributed MapReduce solutions using Go
Book Description
Functional programming is a popular programming paradigm that is used to simplify many tasks and will help you write flexible and succinct code. It allows you to decompose your programs into smaller, highly reusable components, without applying conceptual restraints on how the software should be modularized.
This book bridges the language gap for Golang developers by showing you how to create and consume functional constructs in Golang.
The book is divided into four modules. The first module explains the functional style of programming; pure functional programming (FP), manipulating collections, and using high-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, to increase performance, and to build better Cloud-native applications. The last module delves into the underpinnings of FP with an introduction to category theory for software developers to give you a real understanding of what pure functional programming is all about, along with applicable code examples.
By the end of the book, you will be adept at building applications the functional way.
What you will learn
- Learn how to compose reliable applications using high-order functions
- Explore techniques to eliminate side-effects using FP techniques such as currying
- Use first-class functions to implement pure functions
- Understand how to implement a lambda expression in Go
- Compose a working application using the decorator pattern
- Create faster programs using lazy evaluation
- Use Go concurrency constructs to compose a functionality pipeline
- Understand category theory and what it has to do with FP
About the Author
Lex Sheehan has a B.S. in Computer Science from Auburn University, resides in Atlanta, GA, and works as a senior software engineer with over 20 years of experience. He has a deep understanding of functional programming; His first encounter was using high-order functions in Ruby, Scala, JavaScript, Haskell, Java, and Go.
Lex worked for IBM Software Group and IBM Global Business Services, designing and building various enterprise business systems. He is the author of eight US patents (IT security and data transformations) and he writes a blog titled Application Development with Lex Sheehan.
Lex is available to consult and meet with your CTO, or provide in-house training on the information in this book.
Table of Contents
- Pure Functional Programming in Go
- Manipulating Collections
- Using Higher Order Functions
- SOLID Design in Go
- Adding Functionality with Decoration
- Building on an Onion Architecture
- Functional Parameters
- Increasing Performance Using Pipelining
- Intro to Category Theory for Software Developers
- Functors, Monoids, and Type Classes
- Monads
- Appendix
商品描述(中文翻譯)
#### 主要特點
- 使用串流和高階函數撰寫簡潔且可維護的程式碼
- 理解為 Golang 函數進行柯里化的好處
- 學習最有效的函數式程式設計模式,並了解何時應用每一種模式
- 使用 Go 建立分散式的 MapReduce 解決方案
#### 書籍描述
函數式程式設計是一種流行的程式設計範式,用於簡化許多任務,並幫助您撰寫靈活且簡潔的程式碼。它允許您將程式分解為更小的、高度可重用的組件,而不對軟體的模組化施加概念上的限制。
本書為 Golang 開發者填補了語言上的鴻溝,展示了如何在 Golang 中創建和使用函數式構造。
本書分為四個模組。第一個模組解釋了函數式程式設計的風格;純函數式程式設計 (FP)、操作集合和使用高階函數。在第二個模組中,您將學習可以用來構建 FP 風格應用程式的設計模式。在接下來的模組中,您將學習可以用來改善 API 簽名、提高性能和構建更好的雲原生應用程式的 FP 技術。最後一個模組深入探討了 FP 的基礎,並為軟體開發者介紹了類別理論,以便讓您真正理解純函數式程式設計的本質,並提供可應用的程式碼範例。
在書籍結束時,您將能夠熟練地以函數式方式構建應用程式。
#### 您將學到的內容
- 學習如何使用高階函數組合可靠的應用程式
- 探索使用 FP 技術(如柯里化)消除副作用的技巧
- 使用一級函數實現純函數
- 理解如何在 Go 中實現 lambda 表達式
- 使用裝飾者模式組合一個可運行的應用程式
- 使用惰性評估創建更快的程式
- 使用 Go 的併發構造組合功能管道
- 理解類別理論及其與 FP 的關係
#### 關於作者
**Lex Sheehan** 擁有奧本大學的計算機科學學士學位,居住在喬治亞州亞特蘭大,並擔任資深軟體工程師,擁有超過 20 年的經驗。他對函數式程式設計有深入的理解;他的第一次接觸是在 Ruby、Scala、JavaScript、Haskell、Java 和 Go 中使用高階函數。
Lex 曾在 IBM 軟體集團和 IBM 全球商業服務部工作,設計和構建各種企業商業系統。他擁有八項美國專利(IT 安全和數據轉換),並撰寫名為《與 Lex Sheehan 一起開發應用程式》的部落格。
Lex 可以提供諮詢,與您的 CTO 會面,或提供本書內容的內部培訓。
#### 目錄
1. Go 中的純函數式程式設計
2. 操作集合
3. 使用高階函數
4. Go 中的 SOLID 設計
5. 使用裝飾添加功能
6. 基於洋蔥架構的構建
7. 函數式參數
8. 使用管道提高性能
9. 軟體開發者的類別理論入門
10. 函子、單元和類型類
11. 單子
12. 附錄