aboutsummaryrefslogtreecommitdiff
path: root/examples/greeting.ts
blob: 5e1a164ca4dd26bfccea6d5da0af6187c40ebde7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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>,
]