On 9/25/06, Miroslav Silovic <[EMAIL PROTECTED]> wrote:
TSa wrote:
>
> >   role Set[::T = Item] does Collection[T] where {
> >       all(.members) =:= one(.members);
> >   };
>
> Nice usage of junctions!
>

But buggy - one means *exactly* one. So for an array of more than 1
element, all(@array) never equals one(@array) - if they're all the same,
it's more than 1, otherwise it's 0.

Yeah, that would've been cool. Are we left with asserting
C<all(.members »=:=« one(.members))>? That'd be pretty close to the
original elegance.

Ashley Winters

Reply via email to