Is it possible to implement filter using foldl instead of foldr?

functional-programming, haskell

Solution

Using difference lists:

filter' :: (a -> Bool) -> [a] -> [a]
filter' p xs = foldl (\k x -> if p x then k . (x:) else k) id xs []

Problem

Is it possible to implement filter using foldl instead of foldr? If so, please explain your implementation gently.

Original source