aboutsummaryrefslogtreecommitdiff
path: root/examples/40-imported-struct-methods/src/Counting.shed
blob: ac97df140258e2b4868db1b02876f21694712a15 (plain)
1
2
3
4
5
6
7
8
9
10
11
pub struct Count(value: Int) {
    fun message(this) -> String {
        if (this.value == 1) {
            "one\n"
        } else if (this.value == 2) {
            "two\n"
        } else {
            "many\n"
        }
    }
}