[英]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?)
(如果是这样,我在哪里可以看到?)
It's in Data.List
:它在
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]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.