Raku/old-design-docs

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

lizmat opened this issue · 1 comments

.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

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