You can remove a line:
or empty a numbered line with an empty string (and clean it later):
Code: Select all
(nth-set (f 4) "") ; line 4, 0-based
(clean empty? f)
or empty a line containing a string pattern
Code: Select all
(nth-set (f (find "line 4" f 0)) "")
or empty a sequence of lines that contain a string
Code: Select all
(println f)
(dolist (i (ref-all "-------" f))
(nth-set (f i) ""))
or make a new list by extracting a sequence of line numbers starting at a matching line:
Code: Select all
(select f (sequence (find "line 4" f 0) (length f)))
(lots of scope with select, with the list-selection...)
It might depend on how big your file is to start with, but you probably won't notice too many problems with a 'chapter'..