mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-23 06:10:02 +08:00
* Compile Effect generators statically * test: declare the dormant array write's expected fence
10 lines
278 B
TypeScript
10 lines
278 B
TypeScript
import { Effect } from "effect";
|
|
|
|
const program = Effect.gen(function* () {
|
|
const name = yield* Effect.succeed("world");
|
|
yield* Effect.sync(() => console.log("Hello, " + name + "!"));
|
|
return 42;
|
|
});
|
|
|
|
Effect.runPromise(program).then((value: number) => console.log(value));
|