feat: nested constr access and module funcs now work

This commit is contained in:
Kasey White
2022-12-01 00:46:48 -05:00
committed by Lucas
parent 3d3beef7d4
commit 044d609a24
3 changed files with 229 additions and 41 deletions

View File

@@ -18,8 +18,8 @@ pub type Datum {
rdmr: Redeem,
}
pub fn eqInt(a: Int, b: Int) {
a == b
pub fn eqIntPlusOne(a: Int, b: Int) {
a + 1 == b
}
pub fn eqString(a: ByteArray, b: ByteArray) {
@@ -35,3 +35,13 @@ pub type Other {
Wow
Yes
}
pub fn incrementor(counter: Int, target: Int) -> Int {
if counter == target {
counter
} else if counter > target {
counter - target
} else {
incrementor(counter + 1, target)
}
}