Hi --

On Mon, 21 Jan 2002, ts wrote:

> >>>>> "D" == David Alan Black <dblack / candle.superlink.net> writes:
>
> D>   http://www.rubygarden.org/ruby?CodingChallenge0001
>
>  This must work ?
>
> pigeon% cat c.rb
> #!/usr/bin/ruby
> require 'coll'
> p ACollection.new("a-c,g-h,k,x-y,aa-ac").expanded
> p ACollection.new("y,x,a,b,ab,c,g,h,k,aa,ac").compacted
> pigeon%
>
> pigeon% c.rb
> "a,b,c,g,h,k,x,y,aa,ab,ac"
> "a-c,g-h,k,x-y,aa-ac"
> pigeon%
>
>  but I don't like the algorithm

I'm not sure what you mean about the alphabetic examples.  (That
would raise an argument error in the framework I've written, which
expects only integers.)


David

-- 
David Alan Black
home: dblack / candle.superlink.net
work: blackdav / shu.edu
Web:  http://pirate.shu.edu/~blackdav