The problem is here, the solutions are here. I don't see a solution like mine (maybe the 4th), it seems to work though.
-- ---------------------------
-- 18 (**) Extract a slice from a list (idx start from 1)
slice _ _ 0 = []
slice (x:xs) 1 k = x : slice xs 1 (k-1)
slice (x:xs) i k = slice xs (i-1) (k-1)
I tried testing it with QuickCheck against the drop/take solution, but it gives up because of the very restrictive conditions (1 <= i <= k <= len xs) and I don't want to get deeper in testing right now.
Is this good Haskell code? Am I forgetting any edge case? (...should I suggest it on the solutions wiki?)