foldl :: (a -> b -> a) -> a -> [b] -> a

foldl f init xs = foldr f’ id xs init

where f’ x g z = g ( f z x )

at first definition of f’ looks puzzling , but if we looks at step fxn in foldr :

a->b->b

so (in easy to say words ) f’ is just preserving order of operands and with foldr we are creating a chain .