如果我尝试运行这个msall小代码:
module Problem14 where
duplicate = foldl (\acc x -> acc ++ [x,x]) []
我收到GHCi的以下错误消息:
*Ambiguous type variable `t0' arising from a use of `foldl'
prevents the constraint `(Foldable t0)' from being solved.
Relevant bindings include*
为什么GHCi会给我这个消息?