It's a matter of taste. I prefer the function composition in this case.<br>It reads nicely as a pipeline.<br><br> -- Lennart<br><br><div class="gmail_quote">On Fri, Feb 1, 2008 at 9:48 PM, Dan Licata <<a href="mailto:drl@cs.cmu.edu">drl@cs.cmu.edu</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Not to start a flame war or religious debate, but I don't think that<br>
eta-expansions should be considered bad style. I realize that<br>
composition-style is good for certain types of reasoning, but fully<br>
eta-expanded code has an important legibility advantage: you can tell<br>
the shape of its type just by looking at it! Personally, I'd rather<br>
read the original version.<br>
<font color="#888888"><br>
-Dan<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Feb01, Derek Elkins wrote:<br>
> On Fri, 2008-02-01 at 00:09 -0500, Cale Gibbard wrote:<br>
> > Hello,<br>
> ><br>
> > Today on #haskell, resiak was asking about a clean way to write the<br>
> > function which allocates an array of CStrings using withCString and<br>
> > withArray0 to produce a new with* style function. I came up with the<br>
> > following:<br>
> ><br>
> > nest :: [(r -> a) -> a] -> ([r] -> a) -> a<br>
> > nest xs = runCont (sequence (map Cont xs))<br>
><br>
> This is what you write after all that time on #haskell?<br>
><br>
> nest = runCont . sequence . map Cont<br>
><br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>