0.1.6
Delimited Continuations for JavasScript
Attributes
Includes Deno configuration
Repository
Current version released
2 years ago
Continuation
Delimited continuations for JavaScript
Install
Synopsis
//deno
import { evaluate } from "https://deno.land/x/continuation/mod.ts";
//npm
import { evaluate } from "@frontside/continuation";
evaluate(function* () {
for (let i = 5; i > 0; i--) {
console.log(`${i}...`);
yield* shift(function* (resume) {
setTimeout(resume, 1000);
});
}
console.log("blast off!");
});
prints:
5...
4...
3...
2...
1...
blast off!