官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 丰城市| 长丰县| 桂平市| 肇州县| 云南省| 临江市| 淅川县| 禄丰县| 东阳市| 长春市| 南投县| 通海县| 泸水县| 郧西县| 靖宇县| 西宁市| 台前县| 阿拉善右旗| 株洲县| 十堰市| 繁峙县| 涞水县| 濮阳县| 丰宁| 虞城县| 台南市| 淅川县| 武功县| 安庆市| 通许县| 江川县| 滦南县| 临清市| 乳山市| 逊克县| 双流县| 闸北区| 宜章县| 阿坝县| 定边县| 克山县|