RosettaCodeData/Task/Remove-lines-from-a-file/PicoLisp/remove-lines-from-a-file.l
2023-07-01 13:44:08 -04:00

7 lines
279 B
Text

(de deleteLines (File Start Cnt)
(let L (in File (make (until (eof) (link (line)))))
(if (> (+ (dec 'Start) Cnt) (length L))
(quit "Not enough lines")
(out File
(mapc prinl (cut Start 'L))
(mapc prinl (nth L (inc Cnt))) ) ) ) )