# # R E S U L T S E Q U E N C E I M A G E S # # This program illustrates a technique for producing string images # of result sequences, using co-expressions. procedure main() write(Seqimage(create 1 to 10)) write(Seqimage(create &fail)) write(Seqimage(create (1 to 10 by 2) | (10 to 1 by -2))) write(Seqimage(create !"abc" || !"xy")) write(Seqimage(create Seqimage | main)) write(Seqimage(create |read())) end procedure Seqimage(e) local s s := "" while s ||:= ", " || image(@e) return "{" || s[3:0] || "}" | "{}" end