On 2/26/07, Thomas Hartman <[EMAIL PROTECTED]> wrote:

Here's my, probably very obvious, contribution.

What I'd like feedback on is

1) code seem ok? (hope so!)


Hi Thomas,

tail [] raises an error, therefore your code will fail when n > 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 :: Int ->
[Int] -> [Int]).

2) What do you think of the tests I did to verify that this
behaves the way I want? Is there a better / more idiomatic way to do
this?


You may be interested in the following projects:

QuickCheck: http://www.cs.chalmers.se/~rjmh/QuickCheck/
HUnit: http://sourceforge.net/projects/hunit


Regards,
Antonio
--
http://antoniocangiano.com
Zen and the Art of Ruby Programming
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to