Closed cpennington closed 5 years ago
Thanks for reporting, that's definitely not intended behavior. I can't seem to reproduce this however, can you provide an example?
The repo I observed it in was private, so it's hard to give you a quick repro case. I was using something like flip cfold [] $ \acc (c, e :: Entity) -> (c, e) : acc
, and got a list that had the same (c, e)
pair at the beginning and the end.
This should be fixed in 8.1.0, please let me know if you still run into this
As far as I can tell, there are cases when a
cfold
over aCache k (Map SomeComponent)
will sometimes call the combining function on the same entity multiple times. If this is intended, it's surprising and should perhaps be documented.