- Posted by Nick Johnson <arachnid at MAD.SCIENTIST.COM> Mar 26, 2000
- 1927 views
Michael Nelson wrote: > Skoda wrote: > > > does anybody have the function that converts sequences with many other > > sequences under it, and sequences under it, into one sequence which has > > just atoms(=string) > > i have tried to write such function but it would be quite complicated > > because there can be unlimited number of sequences under sequences... > > --Warning untested code: > > function sequence_to_string(sequence s) > sequence rs > rs={} > for i=1 to length(s) do > if atom(s[i]) then > rs&=s[i] > else > rs&=sequence_to_string(s[i]) > end if > end for > return rs > end function > > -- Mike Nelson Noooooooooooo! You got there first! Not fair! I was looking forward to this!! Nick