winnie33
winnie33

Reputation: 37

How do I properly use '/=' haskell infix operator for xor?

I'm learning haskell and I'm having an issue getting a line of code to work. The error says it is specifically to do with my "/=" operator. Could anyone help me properly use it?

Thank you.

e = filter (\(x, y, _) -> (x `elem` ed) `(/=)` (y `elem` ve)) es

Upvotes: 2

Views: 190

Answers (1)

Brian61354270
Brian61354270

Reputation: 14434

Simply write /= as a normal infix operator:

e = filter (\(x, y, _) -> (x `elem` ed) /= (y `elem` ve)) es

Upvotes: 7

Related Questions