- 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.
推薦閱讀
- C語言程序設計(第2 版)
- FreeSWITCH 1.8
- Python程序設計(第3版)
- PyTorch自然語言處理入門與實戰
- HBase從入門到實戰
- 區塊鏈:以太坊DApp開發實戰
- Xamarin.Forms Projects
- TypeScript項目開發實戰
- Gradle for Android
- Python Web數據分析可視化:基于Django框架的開發實戰
- iOS開發實戰:從入門到上架App Store(第2版) (移動開發叢書)
- QPanda量子計算編程
- Learning Cocos2d-JS Game Development
- Splunk Developer's Guide(Second Edition)
- Python程序設計案例教程:從入門到機器學習(微課版)