Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7052821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:25:47+00:00 2026-05-28T03:25:47+00:00

Interested in the concept of continuation, I started reading wikis, posts, and came to

  • 0

Interested in the concept of continuation, I started reading wikis, posts, and came to this "simple" example:

reset {
  ...
  shift { k: (Int=>Int) =>  // the continuation k will be the '_ + 1' below
    k(7)
  } + 1
}
// result: 8

Without knowledge of Scala, I’m totally lost here, could not figure out how the 8 comes out.

Below is how I tried to figure out the meaning but failed. Any guy could you please give me a short explanation? Yeah there are Scala grammar books but they are too thick, I’m more interested in understanding delimited continuation concept than master Scala language…

  • (Int=>Int)

    Looks like a C# delegate, input is Int, output is Int.

  • k: (Int=>Int) => k(7)

    I’m lost here… what is k, and what is (Int=>Int)=>k(7)?

  • shift { k: (Int=>Int) => k(7) } + 1

    Even more lost…

  • reset { ...; shift { k: (Int=>Int) => k(7) } + 1 }

    Even even more and more lost…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:25:47+00:00Added an answer on May 28, 2026 at 3:25 am

    I found Chris League’s talk, “Monadologie: Professional Help for Type Anxiety” (http://vimeo.com/13304075) contains one of better examples of a delimited continuation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a while, I've been interested in creating a proof-of-concept chat program using C++.
I interested to work with data types and file formats. For example I want
I am interested in doing this C code in Java: // sets n's ith
I'm interested in the android app store concept. I'm just wondering if there is
We're interested in moving from a source control system that supports the concept of
Clojure has introduced me to the concept of Lisp syntax, and I'm interested, but
I suspect the answer to this is No, based purely on the concept of
I am always interested in hacking, I understand the concept of SQL injection and
I'm very new to the concept of writing an assembler and even after reading
This may be a hopelessly vague question. But I am interested to hear whatever

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.