Maybe this is a better way to build what you want.String streamContents: [:stream |
gifts
do: [:each | stream nextPutAll: each ]
separatedBy: [ stream nextPut: $,; space ]
]
Hello,
Im testing all my solutions with critiz and can solve almost all problems,
Only this one I cannot figure out.
I have this code
(gifts allButLast inject: '' into: [ :str :each | str , each , ', ' ]) , 'and ' , gifts last ] and critiz says I should use a stream . How can I make this work ? Roelof