Merge pull request #411 from dfinity/ggreif/update-moc-0.7.0#412
Merge pull request #411 from dfinity/ggreif/update-moc-0.7.0#412fury02 wants to merge 2 commits intocaffeinelabs:masterfrom
Conversation
|
Dear @fury02, In order to potentially merge your code in this open-source repository and therefore proceed with your contribution, we need to have your approval on DFINITY's CLA1. If you decide to agree with it, please visit this issue and read the instructions there. — The DFINITY Foundation Footnotes
|
| public func put<T>(s : Set<T>, x : T, xh : Hash, eq : (T, T) -> Bool) : Set<T> { | ||
| let (s2, _) = Trie.put<T,()>(s, { key = x; hash = xh }, eq, ()); | ||
| s2 | ||
| // let (s2, _) = Trie.put<T,()>(s, { key = x; hash = xh }, eq, ()); |
There was a problem hiding this comment.
feel free to remove old code, this obscures the real changes in the PR's diff
| s2 | ||
| // let (s2, _) = Trie.remove<T, ()>(s, { key = x; hash = xh }, eq); | ||
| // s2 | ||
| s := Trie.remove<T, ()>(s, { key = x; hash = xh}, eq).0; |
There was a problem hiding this comment.
Does this even compile? Function parameters are supposed to be immutable.
There was a problem hiding this comment.
Fixed. Recommendations have also been adopted.
Update `moc` to 0.7.0
|
I'm sorry, checking fixed it Using (T -> type Nat) my_trie_set := TrieSet.put(my_trie_set, 1, Nat.hash, Nat.equal) |
d52aecd to
08507fc
Compare
Update
mocto 0.7.0The put; delete functions do not work; (TrieSet)
I made a correction by referring directly to the Trie.
Look maybe these are all the fixes that are needed