GHC splitAt performance

Viewed 431

splitAt is implemented in GHC in this way:

splitAt n xs  =  (take n xs, drop n xs)
  1. So does, splitAt do double the work or is there some behind the curtain optimization?
  2. Furthermore, take and drop generate a recursive process. Why is that. After all they are library functions and beauty is not as important. Why aren't they implemented to create an iterative process?
2 Answers
Related