add field access and list patterns are finished

Co-authored-by: rvcas <x@rvcas.dev>
This commit is contained in:
Kasey White
2022-11-27 03:12:13 -05:00
committed by Lucas
parent abe29a3883
commit 8b24a66b7e
6 changed files with 486 additions and 485 deletions

View File

@@ -44,14 +44,13 @@ pub fn who(a: ByteArray) -> ByteArray {
}
pub type Datum {
Buy
Sell
thing: Int,
stuff: Int,
}
pub fn spend(datum: Datum, _rdmr: Nil, _ctx: Nil) -> Bool {
let x = [[[2, 9], [7]], [[4]], [[6]]]
let [[[a, g], d], b, ..] = x
True
when datum.thing is {
0 -> True
_ -> False
}
}