FASTA format: Difference between revisions
Added Arturo implementation
(Added Wren) |
Drkameleon (talk | contribs) (Added Arturo implementation) |
||
Line 168:
Rosetta_Example_2: THERECANBESEVERALLINESBUTTHEYALLMUSTBECONCATENATED
</pre>
=={{header|Arturo}}==
<lang rebol>parseFasta: function [data][
result: #[]
current: ø
loop split.lines data 'line [
if? `>` = first line [
current: slice line 1 (size line)-1
set result current ""
]
else ->
set result current (get result current)++line
]
return result
]
text: {
>Rosetta_Example_1
THERECANBENOSPACE
>Rosetta_Example_2
THERECANBESEVERAL
LINESBUTTHEYALLMUST
BECONCATENATED
}
inspect.muted parseFasta text</lang>
{{out}}
<pre>[ :dictionary
Rosetta_Example_1 : THERECANBENOSPACE :string
Rosetta_Example_2 : THERECANBESEVERALLINESBUTTHEYALLMUSTBECONCATENATED :string
]</pre>
=={{header|AutoHotkey}}==
|