aboutsummaryrefslogtreecommitdiff
path: root/examples/greeting.ts
blob: ac591518647e890ea254ac26a532d25607faa606 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { PutString, Bind, Kind1, ReadLine, Seq } from '../stdlib'

interface GreetK extends Kind1<string> {
  return: Seq<[
    PutString<"Hello, ">,
    PutString<`${this['input']}\n`>
  ]>,
}

export type main = [
  PutString<"Your name? ">,
  Bind<ReadLine, GreetK>,
]