[Haskell-cafe] Hi can u explain me how drop works in Haskell
acangiano at gmail.com
Mon Feb 26 03:35:47 EST 2007
On 2/26/07, Thomas Hartman <tphyahoo at gmail.com> wrote:
> Here's my, probably very obvious, contribution.
> What I'd like feedback on is
> 1) code seem ok? (hope so!)
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
You may be interested in the following projects:
Zen and the Art of Ruby Programming
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe