std.compress

Idan Arye GenericNPC at gmail.com
Wed Jun 5 13:29:30 PDT 2013


On Wednesday, 5 June 2013 at 19:47:57 UTC, Brad Roberts wrote:
> On 6/5/13 12:34 PM, Andrei Alexandrescu wrote:
>> On 6/5/13 2:26 PM, Brad Anderson wrote:
>>> On Wednesday, 5 June 2013 at 17:36:05 UTC, Andrei 
>>> Alexandrescu wrote:
>>>> Right now we have joiner(), which given several ranges of T, 
>>>> offers a
>>>> range of T. Developing along that idea, we should have two 
>>>> opposite
>>>> functions: itemize() and collect().
>>>
>>> collect() is sometimes used as the name for map() in some 
>>> languages
>>> (e.g., Ruby, Smalltalk). I don't think it's a problem but 
>>> maybe a note
>>> in the documentation would be warranted to point people to 
>>> map.
>>> Alternatively it could be called something like bundle or 
>>> parcel.
>>
>> Love bundle/parcel! Probably bundle more because it's more 
>> obvious it's a verb.
>>
>> Andrei
>
> Well, both bundle and parcel can be both nouns and verbs.

We already have that function and it's called `chunks`: 
http://dlang.org/phobos/std_range.html#chunks


More information about the Digitalmars-d mailing list