You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
All that trampoline does is repeatedly call the return value of a function until it’s no longer a function
Describe the solution you'd like
functionevenOline(n){if(n===0)returntrue;elsereturnpartial1(oddOline,Math.abs(n)-1);}functionoddOline(n){if(n===0)returnfalse;elsereturnpartial1(evenOline,Math.abs(n)-1);}trampoline(oddOline,3);//=> truetrampoline(evenOline,200000);//=> truetrampoline(oddOline,300000);//=> falsetrampoline(evenOline,200000000);// wait a few seconds//=> true
Describe alternatives you've considered
Additional context
The code and exmplanation comes from book Functional Javascript by Michael Fogus.
Possible implementation for the function:
Is your feature request related to a problem? Please describe.
All that trampoline does is repeatedly call the return value of a function until it’s no longer a function
Describe the solution you'd like
Describe alternatives you've considered
Additional context
The code and exmplanation comes from book Functional Javascript by Michael Fogus.
Possible implementation for the function:
The text was updated successfully, but these errors were encountered: