- Functional Python Programming
- Steven F. Lott
- 166字
- 2021-08-27 19:20:26
Summary
In this chapter, we looked closely at writing pure functions free of side effects. The bar is low here, since Python forces us to use the global statement to write impure functions. We looked at generator functions and how we can use these as the backbone of functional programming. We also examined the built-in collection classes to show how they're used in the functional paradigm. While the general idea behind functional programming is to limit the use of stateful variables, the collection objects are generally stateful and, for many algorithms, also essential. Our goal is to be judicious in our use of Python's non-functional features.
In the next two chapters, we'll look at higher-order functions: functions that accept functions as arguments as well as returning functions. We'll start with an exploration of the built-in higher-order functions. In later chapters, we'll look at techniques for defining our own higher-order functions. We'll also look at the itertools and functools modules and their higher-order functions in later chapters.
- C#高級編程(第10版) C# 6 & .NET Core 1.0 (.NET開發經典名著)
- Vue.js 3.0源碼解析(微課視頻版)
- 精通API架構:設計、運維與演進
- Kotlin Standard Library Cookbook
- Building an RPG with Unity 2018
- VMware虛擬化技術
- 微信小程序全棧開發技術與實戰(微課版)
- Hadoop 2.X HDFS源碼剖析
- 3ds Max印象 電視欄目包裝動畫與特效制作
- HTML+CSS+JavaScript網頁制作:從入門到精通(第4版)
- Java程序設計教程
- PHP+MySQL Web應用開發教程
- Java Web動態網站開發(第2版·微課版)
- 創新工場講AI課:從知識到實踐
- Java Web入門很輕松(微課超值版)