RosettaCodeData/Task/FASTA-format/Zkl/fasta-format-1.zkl
2023-07-01 13:44:08 -04:00

8 lines
336 B
Text

fcn fasta(data){ // a lazy cruise through a FASTA file
fcn(w){ // one string at a time, -->False garbage at front of file
line:=w.next().strip();
if(line[0]==">") w.pump(line[1,*]+": ",'wrap(l){
if(l[0]==">") { w.push(l); Void.Stop } else l.strip()
})
}.fp(data.walker()) : Utils.Helpers.wap(_);
}