Luke Palmer schrieb: > I think this is O(n) time, O(1) space (!). > > lastk :: Int -> [a] -> [a] > lastk k xs = last $ zipWith const (properTails xs) (drop k xs) > where properTails = tail . tails If (drop k xs) is empty, this yields an error when calling 'last'. This might be a bug or a feature.