To my
> When processing this tree, it would be natural to write in each node
> m + b and min [m,b].
>
> The former is "necessary" due to the infix-binary tradition.
> The latter uses [,] because it is good to have one function min for a
> list and for the two elements.
Matt Harden <[EMAIL PROTECTED]> writes
> There is not only the "infix-binary" tradition to consider. Haskell
> also has a "tradition" of curried functions. If you insist on
> eliminating one of "min" and "minimum", then I would rather keep "min",
> and write "foldl1 min" instead of minimum. I consider min to be the
> simpler and more useful function.
>
> You don't have to use all the functions in the prelude; you are free to
> ignore the ones you consider redundant.
I do not feel aggressive against Prelude.
Concerning foldl1 min,
there is a little spot that it tends to run in O(n) space:
foldl1 min [1..n]
While the simplest direct implementation of minimumBy tend to run
in a constant space.
------------------
Sergey Mechveliani
[EMAIL PROTECTED]