Fix to variant name creation for dependencies.
Last few changes to go Tuple Index, Assert, Check, not change test 35 to produce intended functionality
This commit is contained in:
@@ -4,6 +4,10 @@ pub opaque type Dict<key, value> {
|
||||
inner: List<#(ByteArray, value)>,
|
||||
}
|
||||
|
||||
pub fn toList(self: Dict<ByteArray, value>){
|
||||
self.inner
|
||||
}
|
||||
|
||||
/// Create a new map
|
||||
pub fn new() -> Dict<key, value> {
|
||||
Dict { inner: [] }
|
||||
|
||||
@@ -30,8 +30,7 @@ pub fn add(left v0: Value, right v1: Value) -> Value {
|
||||
v0,
|
||||
v1,
|
||||
fn(_, a0, a1) {
|
||||
Some(
|
||||
dict.union_with(
|
||||
let asset = dict.union_with(
|
||||
a0,
|
||||
a1,
|
||||
fn(_, q0, q1) {
|
||||
@@ -42,8 +41,12 @@ pub fn add(left v0: Value, right v1: Value) -> Value {
|
||||
Some(q)
|
||||
}
|
||||
},
|
||||
))
|
||||
|
||||
)
|
||||
|
||||
when dict.toList(asset) is {
|
||||
[] -> None
|
||||
_ -> Some(asset)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user