paint-brush
On Recursion and Trampoliningby@heypran
2,687 reads
2,687 reads

On Recursion and Trampolining

by Pran B.4mSeptember 5th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In recursion a function calls itself without finishing its own execution. This creates a stack of unfinished function calls and due to memory constraints there can only be a certain limit of function calls allowed in a stack. A tail call is when a recursion call only happens at the end of the function in a return statement. In a trampolined recursion, we call a function that in turn returns a function ( not a function call) and this returned function again calls our recursion function.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - On Recursion and Trampolining
Pran B. HackerNoon profile picture
Pran B.

Pran B.

@heypran

Curiosity killed the Schrodinger's cat? or did it?

About @heypran
LEARN MORE ABOUT @HEYPRAN'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Pran B. HackerNoon profile picture
Pran B.@heypran
Curiosity killed the Schrodinger's cat? or did it?

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite