diff options
Diffstat (limited to 'examples/greeting.ts')
| -rw-r--r-- | examples/greeting.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/greeting.ts b/examples/greeting.ts new file mode 100644 index 0000000..5e1a164 --- /dev/null +++ b/examples/greeting.ts @@ -0,0 +1,14 @@ +import { PutString, Bind, Kind1, ReadLine, Seq } from '../src/stdlib' + +interface GreetK extends Kind1<string> { + return: Seq<[ + PutString<"Hello, ">, + PutString<`${this['input']}\n`> + ]>, +} + +export type main = [ + PutString<"Your name? ">, + Bind<ReadLine, GreetK>, +] + |
