Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Continuation-passing style
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Tail calls== Every call in CPS is a [[tail call]], and the continuation is explicitly passed. Using CPS without ''tail call optimization'' (TCO) will cause both the constructed continuation to potentially grow during recursion, and the [[call stack]]. This is usually undesirable, but has been used in interesting ways; see the [[Chicken (Scheme implementation)#Design|Chicken Scheme]] compiler. As CPS and TCO eliminate the concept of an implicit function return, their combined use can eliminate the need for a run-time stack. Several compilers and interpreters for [[functional programming]] languages use this ability in novel ways.<ref>{{cite book |last1=Appel |first1=Andrew W. |author1-link=Andrew Appel |date=1992 |title=Compiling with Continuations |publisher=Cambridge University Press |isbn=0-521-41695-7}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)