BY Simmi Kava10 Aug 2021 Edit
Trampoline

What is a Trampoline function?


In Computer Programming, trampoline is associated with Jump Instructions i.e. moving to different code paths.

In functional programming, a trampoline is a loop that iteratively invokes thunk-returning functions. i.e. instead of making a recursive call to a function, we return an instruction (thunk) to call that function, to be interpreted in a loop.

Trampoline calls the recursive function in pieces until it no longer produces iterative/recursive calls. It takes recursive function as its argument, wraps it and returns a new function. Within the new function, the recursive function is called. The loop keeps running until function resolves into a value.

Use: To implement tail-recursive calls in stack-oriented programming languages.

References: Blog Article1 | Article 2

BY Simmi Kava
LikeCommentSave
LikeCommentSaveShare
0
Categories
General
YantraJS
Developer Guides
Tutorials
Web Atoms Updates

POPULAR POSTS
17 Mar 2021
LATEST ACTIVITY
Simmi Kava
commented this post.
Simmi Kava
liked this post.
Show more
ARCHIVES
2024
2023
2022
2021
TAGS
javascript (56)
developer (25)
javascriptdeveloper (16)
Xamarin.Forms (16)
Html (14)
typescript (12)
webatoms (12)
xamarin (11)
coding (10)
web-atoms (10)
arrays (9)
android (8)
javascript-developer (8)
csharp (7)
dotnet (7)
css (6)
update (6)
dotnet-standard (5)
function (5)
iOS (5)
methods (4)




Web Atoms: JSX (TSX + TypeScript) for Xamarin.Forms, Hot Reload Your App in Production Environment

PlaygroundSamples Repository