-
-
Notifications
You must be signed in to change notification settings - Fork 154
Closed
Description
I'm writing a small "set extensions" module and hit a snag.
Sandbox: https://mint-lang.com/sandbox/K2ayJmLpwSd4hA
Code to trigger the "impossible error":
module SetX {
fun reduce(set : Set(item), initial : memo, function : Function(memo, item, memo)) {
`#{set}.reduce(#{function}, #{initial})`
}
fun intersection(left : Set(item), right : Set(item)) {
reduce(left, Set.empty, (memo : Set(item), value : item) {
if(Set.has(left, value) && Set.has(right, value)) {
Set.add(memo, value)
} else {
memo
}
})
}
}
I'm using Mint 0.22.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working