spebbe / dartz

Functional programming in Dart
MIT License
749 stars 60 forks source link

Why Right([1]) == Right([1]) is false #100

Closed akbarpulatov closed 2 years ago

akbarpulatov commented 2 years ago

Why Right([1]) == Right([1]) is false ?

spebbe commented 2 years ago

Hi @akbarpulatov! It is because [1] == [1] is false in Dart. This is a behaviour of Dart Lists in general and not specific to dartz. See #80, #45 and #39 for longer explanations.

akbarpulatov commented 2 years ago

Thank you for your response. Closing this issue with this link then: https://stackoverflow.com/questions/10404516/how-can-i-compare-lists-for-equality-in-dart