Double the size

Brian Murphy-Dye brian.murphy-dye at sri.com
Fri Feb 24 03:26:21 UTC 2006


The following code snippet shows a size of 10, but #do: processes  
those 10 items twice. Any ideas what I'm doing wrong?

m := MagmaCollection new.
1 to: 10 do: [:each | m add: each].
Transcript show: String cr, 'size: ', m size asString, String cr.
m do: [:each | Transcript show: each asString, String cr].

Brian.



More information about the Magma mailing list