Start working on using a decision tree for when expr. Also fmt fix. Other Stuff

This commit is contained in:
microproofs
2024-10-08 13:30:29 -04:00
parent 2489e0fdd0
commit 97ee1a8ba6
6 changed files with 330 additions and 16 deletions

View File

@@ -95,8 +95,7 @@ validator redeem(creator: ByteArray) {
fn insert(self: List<a>, e: a, compare: fn(a, a) -> Ordering) -> List<a> {
when self is {
[] ->
[e]
[] -> [e]
[x, ..xs] ->
if compare(e, x) == Less {
[e, ..self]
@@ -153,8 +152,7 @@ fn create_expected_minted_nfts(
} else {
let token_name = blake2b_256(bytearray.push(base, counter))
let accum =
[token_name, ..accum]
let accum = [token_name, ..accum]
create_expected_minted_nfts(base, counter - 1, accum)
}