I am trying to make a Trie2D :
var containerChunk : Trie2D.Trie2D<Nat32, Nat32, [Nat32]> = Trie.empty();
Now , I have to update this containerChunk, with this given key (Nat32) and for value (Nat32, [Nat32]) ,
So I am finding Trie with given key using :
var chunk = Trie2D.find(containerChunk, key(pId), Nat32.equal);
and then I want to update this Trie , by putting (Key, Value)pair in it using :
chunk := Trie.put(chunk, key(chunkId), Nat32.equal, chunkData).0;
But Last method of updating it is giving error :
cannot implicitly instantiate function of type
<K, V>(Trie/351<K, V>, Key/351, (K, K) → Bool, ?V) →
(Trie/351<K, V>, ?V)
to argument of type
(?Trie/351<Nat32, Nat32>, Key/351, (Nat32/646, Nat32/646) → Bool,
[Nat32])
because no instantiation of K/38405, V/39801 makes
(?Trie/351<Nat32, Nat32>, Key/351, (Nat32/646, Nat32/646) → Bool,
[Nat32]) <:
(Trie/351<K/38405, V/39801>, Key/351<K/38405>,
(K/38405, K/38405) → Bool, ?V/39801)
Please Help.