Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Where did the haskell list difference operator (\\) go?

Am I missing something? It seems I don’t have the list difference operator defined…

$ ghci
GHCi, version 8.6.5: http://www.haskell.org/ghc/  :? for help
Prelude> "Hello World!" \\ "ell W"

<interactive>:1:16: error:
    Variable not in scope: (\\) :: [Char] -> [Char] -> t
Prelude> :t (\\)

<interactive>:1:1: error: Variable not in scope: \\
Prelude> :type (\\)

<interactive>:1:1: error: Variable not in scope: \\
Prelude> :type (++)
(++) :: [a] -> [a] -> [a]

Did it get removed? (And if so, where do I look to see that?)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

It’s in Data.List:

% ghci
GHCi, version 8.4.4: http://www.haskell.org/ghc/  :? for help
Prelude> :t (\\)

<interactive>:1:1: error: Variable not in scope: \\
Prelude> import Data.List
Prelude Data.List> :t (\\)
(\\) :: Eq a => [a] -> [a] -> [a]
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading