Unnamed repository; edit this file 'description' to name the repository.
1
2
3
4
5
6
7
8
9
10
11
contract Counter {
    value: Int;

    fun add(x: Int) {
        if (x > 0) {
            self.value = self.value + x;
        } else {
            self.value = 0;
        }
    }
}