<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Yes, writing <tt>sum' = foldl' (+) 0 </tt>in a project-specific
prelude (or even a local binding) is much more maintainable than
grabbing a dependency on a custom prelude.<br>
</p>
<br>
<div class="moz-cite-prefix">On 08/14/2018 02:25 PM, Brandon Allbery
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKFCL4VtiLbJVmPP5bGiSh+Hzvnath3K4XAPGR19QHF1YwrT6A@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Tue, Aug 14, 2018 at 2:57 PM Damian Nadales
<<a href="mailto:damian.nadales@gmail.com"
moz-do-not-send="true">damian.nadales@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_quote">
<div>In view of this, I though, "I can write this
replacing `sum` by `foldl' (+) 0` but wouldn't be nice
if this function was defined already somewhere else?"
That's it.</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>There's a certain tendency for people to look for even
trivial canned solutions, which to my mind misses the point
of functional programming. It's trivial to build exactly
what you need from the building blocks you have, so canned
solutions like Prelude "sum" lead both to this kind of
problem when they don't quite fit, and at the same time
inappropriately encourage people to go looking for "more
appropriate" canned solutions.</div>
<div> </div>
</div>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>brandon s allbery kf8nh</div>
<div><a href="mailto:allbery.b@gmail.com"
target="_blank" moz-do-not-send="true">allbery.b@gmail.com</a></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</body>
</html>