On Wed, 1 Apr 2009, John Macdonald wrote:
> If I understand correctly, (which is by no means assured) a function
> call with a junction as an argument generally acts as if it were
> autothreaded.  So:
>       $x = any(1,2,3);
>       $y = f($x);
> should work like:
>         $y = any( f(1), f(2), f(3) );
> Right?

In general yes.

However if "f" involves some kind of "truth inversion" then logically

        f(any(@x)) == all(map.assuming(&f).(@x))
        f(all(@x)) == any(map.assuming(&f).(@x))

I have in mind something like these in the "standard preamble":

        prefix:«!»(Bool)           does(junctive_inversion)
        prefix:«not»(Bool)         does(junctive_inversion)
        infix:«ne»(String,String)  does(junctive_inversion)
        infix:«!=»(Num,Num)        does(junctive_inversion)
        infix:«!==»(Object,Object) does(junctive_inversion)

(Excuse the rather lose syntax, but I hope you get the idea.)


Reply via email to