From 2979eda13e25725683aa10292b31f22793c4e0c0 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 14 Jan 2023 10:24:18 +0530 Subject: chore: adds fancy syntax for bind functions --- examples/greeting.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/greeting.ts b/examples/greeting.ts index d3d755f..8ed2181 100644 --- a/examples/greeting.ts +++ b/examples/greeting.ts @@ -1,12 +1,21 @@ import { Bind, Kind1 } from '../stdlib/effect' import { PutString, ReadLine, PutStringLn } from '../stdlib/stdio' -interface GreetK extends Kind1 { - return: PutStringLn<`Hello, ${this['input']}`> +interface ResponseK extends Kind1 { + return: PutStringLn<`Interesting that you believe "${this['input']}" is your purpose. Hmmmm...`> } export type main = [ PutStringLn<'Greetotron 6000 initializing...'>, + + PutStringLn<'----------------'>, PutString<'Your name? '>, - Bind + Bind() => + PutStringLn<`Hello, ${name}`>>, + + PutStringLn<'----------------'>, + PutString<'Your purpose in life? '>, + Bind, + + PutStringLn<'----------------'>, ] -- cgit v1.3.1