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

interface GreetK extends Kind1<string> {
  return: PutStringLn<`Hello, ${this['input']}`>
}

export type main = [
  PutStringLn<'Greetotron 6000 initializing...'>,
  PutString<'Your name? '>,
  Bind<ReadLine, GreetK>
]