僕の備忘録(PC、UN*X、ネットワーク関連が中心)なんです。
自分の書いたところは適当(な時とか)に書き換えますので御了承を。
st> foo := 1 to: 5. Interval(1 2 ... 5) st> foo class Interval st> foo do: [:x| Transcript show: x printString; cr]. 1 2 3 4 5 Interval(1 2 ... 5)
st> foo := [:x| Transcript show: x printString; cr] a BlockClosure st> foo class BlockClosure st> 1 to: 5 do: foo. 1 2 3 4 5 1
st> array1 := #(2 5 4 9 1). (2 5 4 9 1 ) st> array2 := Array new: 5. (nil nil nil nil nil ) st> y := 0. 0 st> array1 do: [:x | y := y + 1. array2 at: y put: (x * 2)]. (2 5 4 9 1 ) st> array2 (4 10 8 18 2 )
リンクはご自由にどうぞ。でもURLや内容が変った場合はあしからず。