Just another Perl shrine | |
PerlMonks |
Re^2: RFC: Set::Select: get intersection or union of sets; or more generally, the set of elements that are in one or more input setsby kikuchiyo (Hermit) |
on Dec 16, 2018 at 15:47 UTC ( [id://1227318]=note: print w/replies, xml ) | Need Help?? |
But there's no facility to select elements that are unique to each set, i.e. select elements from each set which aren't present in the other sets There is. '100' selects elements that are unique to the first set. '001|010|100' selects what you want. then a lispish sort of query specification might do the job, as used in LDAP queries - (|(&(1=0)(!(2=-1)))(3=1)(4=1)) - perhaps translated into "and", "or", "in", "not in" and such to make it more perlish. Or "and", "or", "not", "nor", "xor" etc - basically, you need boolean logic and precedence to process things, and a descriptive input specification which supports that. This is precisely what I didn't want to do. Lot of work, lot of edge cases, lot of tests and documentation to write.
In Section
Meditations
|
|