#python #sicp
We can use higher-order functions to convert a function that takes multiple arguments into a chain of functions that each take a single argument. More specifically, given a function f(x, y) , we can define a function g such that g(x)(y) is equivalent to f(x, y) . Here, g is a higher-order function that takes in a single argument x and returns another function that takes in a single argument y . This transformation is called currying.
If you want to change selection, open document below and click on "Move attachment"

1.6 Higher-Order Functions
d is a powerful general computational method for solving differentiable equations. Very fast algorithms for logarithms and large integer division employ variants of the technique in modern computers. 1.6.6 Currying Video: Show Hide <span>We can use higher-order functions to convert a function that takes multiple arguments into a chain of functions that each take a single argument. More specifically, given a function f(x, y) , we can define a function g such that g(x)(y) is equivalent to f(x, y) . Here, g is a higher-order function that takes in a single argument x and returns another function that takes in a single argument y . This transformation is called currying. As an example, we can define a curried version of the pow function: >>> def curried_pow(x): def h(y): return pow(x, y) return h >>&g
{"ft_lang_label":"__label__en","ft_lang_prob":0.7585071,"math_prob":0.9912604,"size":1522,"snap":"2021-43-2021-49","text_gpt3_token_len":356,"char_repetition_ratio":0.1594203,"word_repetition_ratio":0.58536583,"special_character_ratio":0.22010513,"punctuation_ratio":0.10309278,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9897583,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-19T07:47:52Z\",\"WARC-Record-ID\":\"<urn:uuid:ff23b6c6-4580-4aad-881e-6055c202a7c7>\",\"Content-Length\":\"18984\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fd86bed8-d5c7-4df7-a606-7ccd377ad28f>\",\"WARC-Concurrent-To\":\"<urn:uuid:9af39e8e-7203-4ab2-bfc4-31a41fa853e8>\",\"WARC-IP-Address\":\"37.187.26.159\",\"WARC-Target-URI\":\"https://buboflash.eu/bubo5/show-dao2?d=1438472604940\",\"WARC-Payload-Digest\":\"sha1:YZKPTXF43IJXBK277IFF5JU4YM2QDND6\",\"WARC-Block-Digest\":\"sha1:NVE53T3XSEJZT256SUJWDSIWW67IW24U\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585246.50_warc_CC-MAIN-20211019074128-20211019104128-00207.warc.gz\"}"}