splitAt is implemented in GHC in this way:
splitAt n xs = (take n xs, drop n xs)
- So does, splitAt do double the work or is there some behind the curtain optimization?
- 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?