[perl6/specs] ece320: [S32/Containers] Require &classify's test argument...

2011-01-14 Thread noreply
Branch: refs/heads/master
Home:   https://github.com/perl6/specs

Commit: ece3202c883e2361e134d6f0c87bcf4854dc2ab4

https://github.com/perl6/specs/commit/ece3202c883e2361e134d6f0c87bcf4854dc2ab4
Author: Kodi Arfer 
Date:   2011-01-14 (Fri, 14 Jan 2011)

Changed paths:
  M S32-setting-library/Containers.pod

Log Message:
---
[S32/Containers] Require &classify's test argument to be Callable.

An arbitrary Matcher may not have much of a notion of a return value.




[perl6/specs] 308c59: redesign of classify, add categorize

2011-01-14 Thread noreply
Branch: refs/heads/master
Home:   https://github.com/perl6/specs

Commit: 308c5994598a9a85483ed56da017656fb920c921

https://github.com/perl6/specs/commit/308c5994598a9a85483ed56da017656fb920c921
Author: Larry Wall 
Date:   2011-01-14 (Fri, 14 Jan 2011)

Changed paths:
  M S32-setting-library/Containers.pod

Log Message:
---
redesign of classify, add categorize

* classify should take any arity-1 mapper including hash or array
* classify always assumes 1 return value from the mapper
* a function that assumes a list value from the mapper is needed
* that function is called categorize, a bigger name for a slower function
(it is less efficient than classify since it must loop over mapper values)
* both classify and categorize now return a hash, since it's stupid to create
a hash, return its pairs, only to recreate an identical hash outside,
and it's trivial to extract the pairs from a hash if you need them.