I wrote a function, doSkip.For an N-sized list, an element at index 0 consists of the entire input. Index 1 consists of every other element, i.e. the odd elements. Then, indexes 2 to N consist of the respective index of the input.doSkip :: [a] -> [[a]]doSkip []            = []doSkip [x]           = [[x]]doSkip xxs@(_:_:[])  = [xxs]  doSkip xxs@(_:_:xs)  = xxs : everyOther : (rest xs)    where everyOther  = (map (\(_, y) -> y) . filter (\(x, _) -> odd x) . zip [0..]) xxs          rest []     = []          rest (y:ys) = [y] : rest ys Testingghci> doSkipFOOBAR[FOOBAR,OBR,O,B,A,R]ghci> doSkipbippy[bippy,ip,p,p,y]Please critique. I think it's a bit long, but I'm not sure how to shorten it.
doSkip Function
haskell