Don't use backpassing on List.any

This commit is contained in:
Richard Feldman 2022-11-03 23:16:28 -04:00
parent d382eb334f
commit ee9b62d8ae
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B

View file

@ -226,8 +226,7 @@ expect update (single "a" Bool.true) "a" alterValue == empty
## |> Bool.isEq Bool.true
contains : Dict k v, k -> Bool | k has Eq
contains = \@Dict list, needle ->
(Pair key _value) <- List.any list
key == needle
List.any list \Pair key _val -> key == needle
expect contains empty "a" == Bool.false
expect contains (single "a" {}) "a" == Bool.true