<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>As a replacement, what about:</div><div><br></div><div>[ n + 10 | n <- [1..9], odd n ]</div><div><br></div><div>Pithy and not equivalent to "id" :P</div><div><br></div><div>Tom</div><div><br></div><div><br>El Apr 20, 2015, a las 20:47, Tikhon Jelvis <<a href="mailto:tikhon@jelv.is">tikhon@jelv.is</a>> escribió:<br><br></div><blockquote type="cite"><div><div dir="ltr">Are we constraining the examples to not use any external libraries? I can see why that's a good idea, but it also makes it hard to show something both pithy and useful.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 20, 2015 at 5:22 PM, <span dir="ltr"><<a href="mailto:amindfv@gmail.com" target="_blank">amindfv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">While we're at it, the "foldr (:) [] [1,2,3]" example probably isn't going to cause anyone to give away their worldly possessions and dedicate their lives to haskell.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tom<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
El Apr 20, 2015, a las 18:53, Ertugrul Söylemez <<a href="mailto:ertesx@gmx.de">ertesx@gmx.de</a>> escribió:<br>
<br>
> Hi everybody,<br>
><br>
> I'd like to note that the prime "sieve" example that is sitting at the<br>
> top of the homepage is not a real sieve and will more likely make people<br>
> with number theory experience (like me) feel highly irritated rather<br>
> than fascinated. A real sieve does not only run a million times (!)<br>
> faster and consumes far less memory, but is also much longer, even in<br>
> Haskell. Here is a real one:<br>
><br>
> <<a href="http://lpaste.net/101980" target="_blank">http://lpaste.net/101980</a>><br>
><br>
> I don't want to make a mountain out of a molehill, but please note: If<br>
> I'd be new to Haskell, that example would have turned me off, because it<br>
> would have hurt my ability to take Haskell programmers seriously. You<br>
> can easily promote your tools when you claim that they can build a car<br>
> easily, except in reality it's just a toy bicycle.<br>
><br>
> It's the same feeling to cryptographers when people call a regular<br>
> stream cipher a "one-time pad" and promote it as such. It rings the<br>
> "this is snake oil!" alarm bell.<br>
><br>
> So I propose to either rename the 'sieve' function to something more<br>
> appropriate (like `trialDiv`) or replace the example altogether. I<br>
> would suggest an example that truly shows Haskell's strengths. Trial<br>
> division search is really just a bad substitute for the more common and<br>
> equally inappropriate list quicksort example.<br>
><br>
><br>
> Greets,<br>
> Ertugrul<br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>
</div></blockquote></body></html>