I'm not completely following what its purpose is? Below is the code
from the Magritte, living in the SequenceableCollection object:
reduce: aBlock
| result |
self isEmpty
ifTrue: [ ^ nil ].
result := self first.
2 to: self size do: [ :index |
result := aBlock
value: result
value: (self at: index) ].
^ result
In my case, it is causing problems on VW when it calls aBlock (near
the end) and passes in a pair of Characters which are processed by
MAComponentRenderer>>classFor: which then tries to do a string append
(#,) which gives a DNU since VW's characters (and I think Squeak from
what I can tell) do not have concat methods (#,).. Am I missing
something? Below is the code that calls reduce:
MAComponentRenderer>>classFor: aDescription
| classes item |
item := (component description = aDescription
ifTrue: [ component ]
ifFalse: [ self childAt: aDescription ]) ifNotNilDo: [ :comp | comp
model ].
classes := aDescription cssClassesForItem: item.
(self hasError: aDescription) ifTrue: [ classes add: 'error' ].
^ classes reduce: [ :a :b | a , ' ' , b ]