j
k
j a
j l
Am 18.09.2010 09:51, schrieb Christopher Tauss:
I am trying to write a function that takes a list and returns the last n elements.
last_n n = fst . foldr step ([], n) where step _ (xs, 0) = (xs, 0) step x (xs, n) = (x:xs, n-1)
Back to the thread
Back to the list