
= Facets' To Do List

IT IS ALWAYS A GOOD IDEA TO WRITE A TEST!
AND ITS ALWAYS A FINE THING TO IMPROVE DOCUMENTATION!

* Move methods to facets/method and link back to facet/ but prefer library alias
  instead. (Rolls)

* hash/invert: What about letting Hash#invert take a block that specifies
  what to do when a collision occurs?

* hash/at_rand: allow for a _number_ of values, keys and pairs to be returned.

* > Yep. Gone. But I may replace with a version that deletes only the first 
  > matching element. Thoughts?
  If you don't want to do that I would rather add an option hash to .delete and
  use :once => true or something similar. (More expressive)

* numeric/bound_by: Numeric includes Comparable. Maybe drop this, but 
  might it be reasonable for Numeric but no other comparables?

* nil/[]: Why should nil respond to [], but not to .each? I don't think 
  nil should be treated as a container.
  nil/length: See above.

* nil/method_missing: I'm not so sure about this. There is a lot of 
  libraries depending on nil raising exceptions on failed method access. I 
  also think that this could make programming errors very hard to find.

* fileutils/head&tail: Hm, I think the block forms ought to be equivalent to 
  tail -f and so on. Then the block forms should also return all lines by default
  instead of only the first 10.

* fileutils/which: Should probably be based on fileutils/where_is as they have 
  lots of common code. The two methods should probably also use RUBY_PLATFORM instead
  of checking for ALT_SEPARATOR.

* module/memoize: Should the main memoize method be defined as it is? 
  (see bottom of file).

* kernel/demo: It can be implemented as demo "1+1"  using Binding.of_caller. 
  Using only the block is possibly with SCRIPT_LINES__ or File access and is quite ugly.

* hash/weave: Document how does it compare to Hash#merge?

* Perhaps work on alernative require mechinism. Currently there is none.
  Here some pseudo docs for it:

    and an alternative interface to requiring the extension methods.
    With the Facets module you can require a facet method like so:

      Facets.require Time, :stamp

    One of the advantages of this approach is that Facets' can search the class hierarchy
    for a method. For example if you wanted to use #each_permutation on an Array.

      Facets.require 'array/each_permutation'

    Even though #each_permutation is a method of Enumerable this will still work
    because Enumerable is a superclass of Array.

    Also it allows for the use operators without special recourse.
    For instance, the Proc compostion operator can be require simply.

      Facets.require 'proc/*'

    If you're wondering why you have to specify the Facets module in #use,
    it is becuase #use is a generalized method. Anyone can easily take advantage
    of this functionality by utilizing Facets' Module-Package system (package.rb).
    See the API Documentation for further details of putting this to use in your
    programs.

