HaloO,

Larry Wall wrote:
On Fri, Apr 28, 2006 at 04:41:41AM +0000, Luke Palmer wrote:
: It seems like a hash whose values are the unit type.  Does Perl have a
: unit type?  I suppose if it doesn't, we could define one:
: : subtype Unit of Int where 1; : : (Assuming that "where" groks whatever "when" does). : : Then your mutable set is: : : my Hash of Unit $set;

Hmm, well, if values are just single-element subsets, then:

    my %set of 1;
    my 1 %set;

And presumeably also

  my %set of true;
  my true %set;

But the real question is: "Does the storage optimization
fall out naturally or does it need explicit instanciation
of a generic hash container for the unit type?"
--

Reply via email to