- 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.
推薦閱讀
- Java異步編程實戰(zhàn)
- SQL for Data Analytics
- C語言最佳實踐
- Instant RubyMotion App Development
- Getting Started with NativeScript
- Visual Basic程序設計實踐教程
- Selenium Testing Tools Cookbook(Second Edition)
- Visual Basic程序設計實驗指導(第二版)
- 微信小程序開發(fā)與實戰(zhàn)(微課版)
- 匯編語言編程基礎:基于LoongArch
- Oracle GoldenGate 12c Implementer's Guide
- R Data Science Essentials
- 軟件測試分析與實踐
- 深入理解Kafka:核心設計與實踐原理
- Java項目驅動開發(fā)教程