|
|
1.1 ! root 1: # ! 2: # R E S U L T S E Q U E N C E I M A G E S ! 3: # ! 4: ! 5: # This program illustrates a technique for producing string images ! 6: # of result sequences, using co-expressions. ! 7: ! 8: procedure main() ! 9: write(Seqimage(create 1 to 10)) ! 10: write(Seqimage(create &fail)) ! 11: write(Seqimage(create (1 to 10 by 2) | (10 to 1 by -2))) ! 12: write(Seqimage(create !"abc" || !"xy")) ! 13: write(Seqimage(create Seqimage | main)) ! 14: write(Seqimage(create |read())) ! 15: end ! 16: ! 17: procedure Seqimage(e) ! 18: local s ! 19: s := "" ! 20: while s ||:= ", " || image(@e) ! 21: return "{" || s[3:0] || "}" | "{}" ! 22: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.