rawjeev's techposts

  • Random
  • Archive
  • RSS
  • Ask me anything

Continuation Sandwich

I’ve often come across the word ‘Continuations’ in the programming language discussions but I never made up my mind to investigate what it means. Interestingly while reading up a bit about Ruby I hopped to this delicious description of ‘First-class continuations”:

“Say you’re in the kitchen in front of the refrigerator, thinking about a sandwich. 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 sandwich, 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 sandwich. But fortunately, there’s a sandwich on the counter, and all the materials used to make it are gone. So you eat it. :-)”

Source: Wikipedia

    • #programming
    • #tech
    • #continuations
  • 1 year ago
  • Comments
  • Permalink
  • Share
    Tweet

Recent comments

Blog comments powered by Disqus
← Previous • Next →

About

Avatar For posts that are techy / matters a little grey that I din't want to be drowning in randomness.

Home Page     Rawjeev's Randoms

Me, Elsewhere

  • @rawjeev on Twitter
  • Facebook Profile
  • raw2ube on Youtube
  • rawjeev on Flickr
  • rawjeev on Delicious
  • Linkedin Profile
  • rawjeev on github

Twitter

loading tweets…

  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr