RosettaCodeData/Task/FASTA-format/Zkl/fasta-format-1.zkl

9 lines
336 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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(_);
}