15 Dec
2005
15 Dec
'05
9:57 p.m.
How would I go about reading the last 10 lines in a files? Or more generally, how do I go about collecting the last N elements of anything? I'm looking for advice on the "right way" to do this using iterate. On way would be to write collect-tail that just kept the last N elements: (iter (for line :in-file my-file :using #'read-line) (collect-tail line :how-many 10)) Is this a good way? Regards, Chris Dean