Fix imports, use native foldr

Yes, this is a pull request for the pull request. Trying to get elm-lang#591 on track.