Comment detail

ビンゴの結果を整形表示 (Nested Flatten)
Squeak Smalltalk で。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
| n size bingo streams |
n := 35.
size := n printString size + 1.
bingo := (1 to: n) asArray shuffled readStream.
streams := {String new writeStream. String new writeStream}.
World findATranscript: nil.
1 to: n do: [:idx |
	{idx. bingo next} with: streams do: [:int :strm |
		strm nextPutAll: (int printPaddedWith: $  to: size)].
	((idx isDivisibleBy: 10) or: [idx = n]) ifTrue: [
		Transcript cr.
		streams do: [:strm | Transcript cr; show: strm contents. strm reset]]]

Index

Feed

Other

Link

Pathtraq

loading...