foldell :: (a -> b -> a) -> a -> [b] -> a
foldell _ acc [] = acc
foldell f acc (x:xs) = foldell f (f acc x) xs
length' :: [a] -> Int
length' = foldl (\acc _ -> acc + 1) 0
-- in Data.List.foldl'
foldl' :: (a -> b -> a) -> a -> [b] -> a
foldl' _ acc [] = acc
foldl' f acc (x:xs) = seq acc' $ foldl' f acc' xs where acc' = f acc x
length'' :: [a] -> Int
length'' = foldl' (\acc _ -> acc + 1) 0