Can you explain the process of the functional programm | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can you explain the process of the functional programm

https://code.sololearn.com/cIzOJ9VIfjU4/?ref=app

5th Jun 2020, 3:15 PM
Jyothiswaroop.K
Jyothiswaroop.K - avatar
2 Answers
+ 1
Basically, the apply_twice function doubles the application of a function passed as one of the arguments. So you get: add_five(add_five(10)) Since add_five does just that (adds 5), you get: ((10+5)+5), which is 20.
5th Jun 2020, 3:58 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
Thank you.
5th Jun 2020, 5:33 PM
Jyothiswaroop.K
Jyothiswaroop.K - avatar