Module design: When to use a pipeline and when to fold a list?

Code is a liability and the semantics of fold are very clear to me. If I can get by writing less function code and reuse one of the already defined functions, I will do that. In any case, this is a heuristic. Of course I break my own rules when I see better alternatives but these better alternatives arise from the specifics of the types involved.

Just look at the API of the libraries hosted on the elm organization. Read Evan’s Design Process.

1 Like