On 2/26/07, <b class="gmail_sendername">Thomas Hartman</b> &lt;<a href="mailto:tphyahoo@gmail.com">tphyahoo@gmail.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Here&#39;s my, probably very obvious, contribution.<br><br>What I&#39;d like feedback on is<br><br> 1) code seem ok? (hope so!)</blockquote><div><br>Hi Thomas,<br><br>tail [] raises an error, therefore your code will fail when n &gt; length xs (
e.g. mydrop 3 [1,2] will raise an exception, where [] is the expected result). Your function is also limited to list of Int only (mydrop ::<span class="q"> Int -&gt; [Int] -&gt; [Int]).<br></span></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 2) What do you think of the tests I did to verify that this<br>behaves the way I want? Is there a better / more idiomatic way to do<br>this?</blockquote><div><br>You may be interested in the following projects:<br><br>QuickCheck: 
<a href="http://www.cs.chalmers.se/~rjmh/QuickCheck/">http://www.cs.chalmers.se/~rjmh/QuickCheck/</a><br>HUnit: <a href="http://sourceforge.net/projects/hunit">http://sourceforge.net/projects/hunit</a> <br><br><br>Regards,
<br>Antonio<br></div></div>-- <br><a href="http://antoniocangiano.com">http://antoniocangiano.com</a><br>Zen and the Art of Ruby Programming