aboutsummaryrefslogtreecommitdiff
path: root/examples/06-if/src/Counting.shed
blob: fa7d3cbed1e58794f8133ebc7b0c180165fe1a6c (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"
    }
}

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