我不明白的是如何在haskell中以这种方式使用foldl。我不明白参数(在本例中为列表)是如何隐式传递的:
addAll :: [Int] -> Int
addAll = foldl (+) 0
-- This is how I could write foldl to simplify addAll where xs is clearly defined
addAll :: [Int] -> Int
addAll xs = foldl (+) 0 xs
或者
addAll :: [Int] -> Int
addAll = \ xs -> foldl (+) 0 xs
但我真的不明白第一个例子。所以基本上我想知道如何在haskell中对某些东西进行评估?