[Pharo-users] #collect:as:Dictionary

Peter Uhnák i.uhnak at gmail.com
Fri Oct 23 01:12:56 EDT 2015


Hi,

is this intentional behavior?

#(a b c) collect: [ :each | each -> each first asciiValue ] as: Dictionary.
"a Dictionary(1->#a->97 2->#b->98 3->#c->99 )"

(#(a b c) collect: [ :each | each -> each first asciiValue ]) asDictionary.
"a Dictionary(#a->97 #b->98 #c->99 )"

I would expect that collect:as: for Dictionaries would act in the same way
as #asDictionary.

{eter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151023/16445ab8/attachment.html>


More information about the Pharo-users mailing list