Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.

#python #sicp

it is often
clearer to think about recursive calls as functional abstractions.

If you want to change selection, open document below and click on "Move attachment"

**1.7 Recursive Functions**

the standard definition of the mathematical function for factorial: (n−1)!n!n!=(n−1)⋅(n−2)⋅⋯⋅1=n⋅(n−1)⋅(n−2)⋅⋯⋅1=n⋅(n−1)!(n−1)!=(n−1)⋅(n−2)⋅⋯⋅1n!=n⋅(n−1)⋅(n−2)⋅⋯⋅1n!=n⋅(n−1)! While we can unwind the recursion using our model of computation, <span>it is often clearer to think about recursive calls as functional abstractions. That is, we should not care about how fact(n-1) is implemented in the body of fact ; we should simply trust that it computes the factorial of n-1 . Treating a recursive call as a

the standard definition of the mathematical function for factorial: (n−1)!n!n!=(n−1)⋅(n−2)⋅⋯⋅1=n⋅(n−1)⋅(n−2)⋅⋯⋅1=n⋅(n−1)!(n−1)!=(n−1)⋅(n−2)⋅⋯⋅1n!=n⋅(n−1)⋅(n−2)⋅⋯⋅1n!=n⋅(n−1)! While we can unwind the recursion using our model of computation, <span>it is often clearer to think about recursive calls as functional abstractions. That is, we should not care about how fact(n-1) is implemented in the body of fact ; we should simply trust that it computes the factorial of n-1 . Treating a recursive call as a

status | not read | reprioritisations | ||
---|---|---|---|---|

last reprioritisation on | suggested re-reading day | |||

started reading on | finished reading on |

Do you want to join discussion? Click here to log in or create user.