aboutsummaryrefslogtreecommitdiff
path: root/examples/if/src/Counting.shed
blob: 060482b58351535d2f9530212c59e02639989015 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fun message(count: Int) -> String {
    if (count == 1) {
        "one\n"
    } else if (count == 2) {
        "two\n"
    } else {
        "many\n"
    }
}

fun main() ! Io -> Unit {
    print!(message(1));
    print!(message(2));
    print!(message(3));
}