Skip to content

Add foldl' to Prelude #167

@Bodigrim

Description

@Bodigrim

Currently Prelude exports foldl (which is an anti-pattern most of the time, especially for lists), but does not export foldl'. This is silly and harmful, especially for newcomers, who easily fall into the trap and get space leaks even in the simplest programs.

foldl' is a better default choice than foldl, and Prelude should not discriminate the former in favor of the latter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    approvedApproved by CLC votebase-4.20Implemented in base-4.20 (GHC 9.10)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions