The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
A Callcc w/ Dill Havarti and Ham

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
A Callcc w/ Dill Havarti and Ham Posted: Feb 1, 2005 11:23 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: A Callcc w/ Dill Havarti and Ham
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

An old one, but worth repeating if you’ve yet to understand continuations:

Say you’re in the kitchen in front of the refrigerator, thinking about a sandwitch. You take a continuation right there and stick it in your pocket. Then you get some turkey and bread out of the refrigerator and make yourself a sandwitch, which is now sitting on the counter. You invoke the continuation in your pocket, and you find yourself standing in front of the refrigerator again, thinking about a sandwitch. But fortunately, there’s a sandwitch on the counter, and all the materials used to make it are gone. So you eat it. :-)

A continuation doesn’t save data. It’s just a closure that closes over the execution stack (and any lexicals associated with it; thus the “I want a sandwitch” thought). If things change between the taking and invoking of the continuation, those things remain changed after invoking.

From the perl6 list.

Read: A Callcc w/ Dill Havarti and Ham

Topic: Off the Treadmill, Onto the Rails Previous Topic   Next Topic Topic: Time reporting

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use