Closed msakai closed 4 years ago
this seems (naively) like a good bug catch!
1) should we add a test? 2) otherwise seems fine to me (though i would challenge you to keep the function in question generic, since that polymorphic functions avoid more bugs :) , you could eg make it forall n . Eq n => ... )
@ekmett @RyanGlScott thoughts?
If there are duplicates in
successors
,topSortAcyclic
may produce duplicated nodes that end up duplicated backpropagation.For example: