From a107048f87828b87b3bd55db1b6217710c40ee84 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 12 Jan 2023 18:41:49 +0530 Subject: feat: adds mutable reference effects --- examples/hello-world.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/hello-world.ts (limited to 'examples') diff --git a/examples/hello-world.ts b/examples/hello-world.ts new file mode 100644 index 0000000..fcdb8e9 --- /dev/null +++ b/examples/hello-world.ts @@ -0,0 +1,20 @@ +import { Bind, Do, Kind1 } from "../stdlib/effect"; +import { CreateRef, GetRef, Ref, SetRef } from "../stdlib/ref"; +import { Print } from "../stdlib/stdio"; + +interface PrintK extends Kind1 { + return: Print +} + +interface Func extends Kind1 { + return: Do<[ + SetRef, + Bind, PrintK>, + ]> +} + +export type main = [ + Bind, Func>, + Print<1>, +] + -- cgit v1.3.1