Hi
I’m getting into Haskell will the help fo exercism at the moment, and on one of the exercises had some automated feedback that the lazy foldl
tends to leak memory and in most cases the eager foldl'
should be preferred.
Only thing is, when I try to use fold'
I get an error saying it doesn’t exist:
/mnt/exercism-iteration/src/ReverseString.hs:4:17: error:
• Variable not in scope:
foldl' :: ([a0] -> a0 -> [a0]) -> [a1] -> String -> String
• Perhaps you meant one of these:
‘foldl’ (imported from Prelude), ‘foldl1’ (imported from Prelude),
‘foldr’ (imported from Prelude)
Have I input it wrong, or does it need to be imported from somewhere? (I’m really new to Haskell, so appologies if the answer is obvious!)