Re: beg for Bag

2006-11-30 Thread TSa
HaloO, Jonathan Lang wrote: Would (1,2,2,3,4,4) be a Seq or a Bag? Comma constructs a Seq, of course. IMHO, the _only_ way this could work would be if it's a Bag: if it's a Seq, I see no way that one could resolve '(1,2,3) ∪ (3,1,2)'. This is not any different from '3' + '4' resulting

Re: beg for Bag

2006-11-30 Thread Jonathan Lang
TSa wrote: Jonathan Lang wrote: Would (1,2,2,3,4,4) be a Seq or a Bag? Comma constructs a Seq, of course. The context of the question was that you provided the above as the result of unioning two Seqs; as such, I was trying to find out whether you meant that the union of two Seqs should be a

Re: beg for Bag

2006-11-29 Thread TSa
HaloO, Jonathan Lang wrote: Note that this would mean that Seq would also have set operations. I count this as an advantage. So one can write (1,2,3) (|) (2,2,3,4,4) to get a result of (1,2,2,3,4,4). As long as the Seq is a Set, that is it has no duplicates, you get Set behavior through the

Re: beg for Bag

2006-11-29 Thread Jonathan Lang
TSa wrote: Jonathan Lang wrote: Note that this would mean that Seq would also have set operations. I count this as an advantage. So one can write (1,2,3) (|) (2,2,3,4,4) to get a result of (1,2,2,3,4,4). As long as the Seq is a Set, that is it has no duplicates, you get Set behavior through

beg for Bag

2006-11-28 Thread TSa
HaloO, as a spin-off of the 'Set-returning .keys (was Re: Smart Matching clarification)' thread I want to propose the addition of a Bag type that completes the set of immutable types. It shall have the following properties. 1) It is a multiset generalization of Set 2) It is a supertype of Set

Re: beg for Bag

2006-11-28 Thread Smylers
TSa writes: I want to propose the addition of a Bag type Different from the CBag that's already mentioned in Synopsis 3? Smylers

Re: beg for Bag

2006-11-28 Thread Darren Duncan
At 7:08 PM + 11/28/06, Smylers wrote: TSa writes: I want to propose the addition of a Bag type Different from the CBag that's already mentioned in Synopsis 3? Smylers TSa wasn't the first person to ask for an explicit Bag type. I did too, a few weeks ago. And one reason for that was

Re: beg for Bag

2006-11-28 Thread Jonathan Lang
TSa wrote: 1) It is a multiset generalization of Set 2) It is a supertype of Set and Seq (a Set can of course be build from a Seq). That is 'Set does Bag' and 'Seq does Bag'. Note that a Seq is a ready-made Bag and if it happens to have no duplicates it behaves like a Set. 3) It has