UPenn Homework 3: skips function I've started learning Haskell by following along the CIS 194 Course from UPenn.
In the first lessons there is talk about wholemeal programming and certain ways idiomatic Haskell code looks like. 
Now, I think that my style is still far away from being idiomatic and I don't think I've grasped what wholemeal means. 
To see how far away, I'd like some comments on code from the third assignment because that's where I struggled most (until now).

So, how far away from being idiomatic is the code? How's efficiency?

Exercise 1: skips :: [a] -&gt; [[a]]

The nth list in the output should contain every nth element from the input list.  For example, skips "hello!" == ["hello!", "el!", "l!", "l", "o", "!"].

skips :: [a] -&gt; [[a]]
skips list =
  let pos 1 l = l
      pos i lst =
        let tmp = drop (i-1) lst
        in case tmp of
            [] -&gt; []
            x:xs -&gt; x : (pos i xs)
      tmpSkps i acc lst = if i == (length lst)+1
                          then acc
                          else tmpSkps (i+1) ((pos i lst):acc) lst
  in reverse (tmpSkps 1 [] list)
The Lecture Notes advocate "wholemeal" programming, which I would summarize as being the use of higher-order functions.  Your code, on the other hand, suffers from the "indexitis" that you are being encouraged to avoid.

The key insight for this exercise is that it resembles a list-chunking problem.  If you transform "hello!" into, say, chunks of increasing length…

[
    ["h", "e", "l", "l", "o", "!"],
    ["he", "ll", "o!"],
    ["hel", "lo!"],
    ["hell"],
    ["hello"],
    ["hello!"]
]


… then the problem boils down to taking the last element of each substring.

skips :: [a] -&gt; [[a]]
skips xs =
  map (map last . fullChunks) $ zip [1..] (replicate (length xs) xs)
  where
    fullChunks (n, ys)
      | n &gt; length ys = []     -- Discard incomplete chunks
      | otherwise     = chunk : fullChunks (n, rest)
      where (chunk, rest) = splitAt n ys


Unfortunately, you can't use the functions provided by Data.List.Split, since incomplete chunks at the end need to be discarded.