length is O (1), so splitAt enough to define everything you need in an efficient way.
splitAtR is = splitAt (length s - i) s takeR is = snd $ splitAtR is dropR is = fst $ splitAtR is
According to the docs, splitAt costs O(log(min(i,length si))) , so by symmetry splitAtR costs the same thing (just extra +O(1) , which can be neglected).
source share