- Functional Python Programming
- Steven F. Lott
- 99字
- 2021-08-27 19:20:30
Lambdas and the lambda calculus
In a book on a purely functional programming language, it would be necessary to explain lambda calculus, and the technique invented by Haskell Curry that we call currying. Python, however, doesn't stick closely to this kind of lambda calculus. Functions are not curried to reduce them to single-argument lambda forms.
Python lambda forms are not restricted to single argument functions. They can have any number of arguments. They are restricted to a single expression, however.
We can, using the functools.partial function, implement currying. We'll save this for Chapter 10, The Functools Module.
推薦閱讀
- Visual Basic程序設計教程
- Elastic Stack應用寶典
- Haxe Game Development Essentials
- Python數據結構與算法(視頻教學版)
- Swift語言實戰精講
- Teaching with Google Classroom
- C語言程序設計
- 學習OpenCV 4:基于Python的算法實戰
- Create React App 2 Quick Start Guide
- Unity 2018 Shaders and Effects Cookbook
- SQL 經典實例
- App Inventor創意趣味編程進階
- 快速入門與進階:Creo 4·0全實例精講
- Mastering AWS Security
- Python Interviews