Raku / old-design-docs

Raku language design documents
https://design.raku.org/
Artistic License 2.0
124 stars 36 forks source link

.(classify|categorize) specced as of Hash, but returns pairs #53

Closed lizmat closed 11 years ago

lizmat commented 11 years ago

.classify and .categorize are specced as returning a Hash (S32/Containers:156|191), but are currently returning a Parcel of pairs. And the tests are checking for this.

So either the implementation is wrong, or the spec is wrong. I would assume the implementation is wrong.

Additionally, it would seem that one should be able to specify the "keytype" and "of" of the Hash that is being created. I've added these named parameters to .classify and .categorize in the implementation already. If that is a good idea, then this should also be specced. If not, then a simple revert of the associated commits will be done by me

lizmat commented 11 years ago

Meanwhile, things have changed and this issue has now become another issue.