Moritz wrote: >> $value !~~ Junction && $value ~~ $junction > > In general this definition makes it impossible to return a list of > eigenstates from the junction. Just think of junctions containing Code > objects.
Well, that's a deficiency in smartmatching: that Callable ~~ Code doesn't check for identity between the two objects. Likewise the Regex ~~ Regex doesn't check for identity. Likewise Range ~~ Range testing for identical endpoints. Etc. ;-) The definition of eigenvalues() is supposed to be abstractly descriptive, not specifically constructive. The idea is simply: any "leaf" state inside the junction to which the junction could collapse. Now the implementation I already provided does currently rely on smartmatching, but that will be fixed pronto, now that you've kindly pointed out that smartmatching is...well..."broken" on several interesting types of states. :-) > Right; but afaict it's the only thing that can actually be implemented. > And because it doesn't make all too much sense, it's specced to be private. Fine. But please change the name anyway. If we all agree it's not returning eigenstates, and some of us believe it *can't* every return eigenstates, then it certainly shouldn't be called C<.eigenstates>. Damian