Sam Westrick @shwestrick.bsky.social · 19/06/2025Perhaps we can add some annotations to clear it up. Let's specify that the result is uncontended: 120 2
Sam Westrick @shwestrick.bsky.social · 19/06/2025now we get a more informative error: the offending value is the argument `z`. In order for type checker to be satisfied, this value would need to be uncontended. But clearly it is contended: we use it twice in parallel, in the two recursive calls. 120 2
Sam Westrick @shwestrick.bsky.social · 19/06/2025hmm, okay, so where to go from here. This is a bit unfortunate because in 99.99% of use-cases for `reduce`, the combining function `g` will be a simple pure function, and the issue of 'a@contended vs uncontended wouldn't matter. 120 2