From: Christoph Rippel Date: 2001-01-08T18:10:03+09:00 Subject: [ruby-talk:8836] Re: No :<, :>, etc. methods for Array "Christoph Rippel" wrote in message news:MGEAJFIIJOCJJJKGKGIJEEIGCKAA.crippel@primenet.com... > From would you are saying it seems that the container class should > effectively provide this generic zero. What about something like > > class ContainerClass > ZERO = 0 # or something similar like the hypothetical Numeric::ZERO > def def sum(if_empty = type::ZERO) > .. > end > ... > end I guess the ``type::'' prefix is totally unnecessary ... . This makes only sense in the context of a ``SumModule'' to be mixed into a ContainerClass providing this missing ZERO (alternatively the ContainerClass could provide a #zero method.) Christoph