On Oct 22, 6:41 pm, dam...@conway.org (Damian Conway) wrote: > Dave Whipp wrote: > > When this issue has been raised in the past, the response has been that > > junctions are not really intended to be useful outside of the narrow purpose > > for which they were introduced. > > Hmmmmmm. There are intentions, and then there are intentions. I know > what I intended when I invented the original idea, and it wasn't just the > narrow > purpose for which they were added to Perl 6. :-) > > >> Problem 2 could be solved by defining a new (and public!) > >> C<.eigenstates> method in the Junction class. [...] > > > I think that you're proposed solution is a bit too specific: > > That's because I didn't explain Part B of my nefarious plan! namely > that, if you'd only give me proper eigenstates, I'd give you an even > nicer alternative. > > I actually think that the "meta" doesn't belong on the operator at all > (though I have no problem with that idea in itself). > > Instead, I think the "meta" should be placed on the data (which, of > course, is what any(), all(), one(), and none() already do). > > So I'm going to go on to propose that we create a fifth class of > Junction: the "transjunction", with corresponding keyword C<every>. [snip]
I'm probably missing something, but wouldn't it have been easier to write that module by using eval STRING to create all of those infix operators? Start with a list of the names of the operators, generate a string containing all four argument variations for each operator, then eval it.