RosettaCodeData/Task/Remove-lines-from-a-file/PicoLisp/remove-lines-from-a-file.l
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07: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))) ) ) ) )