chunkList n xs = as : chunkList n bs where (as,bs) = splitAt n xs

-- | Replace the last element of a list with another element.
chunkList n xs = as : chunkList n bs where (as,bs) = splitAt n xs

-- | Replace the last element of a list with another element.
chunkList n xs = as : chunkList n bs where (as,bs) = splitAt n xs

-- | Replace the last element of a list with another element.