develooper Front page | perl.perl6.language | Postings from March 2009

Re: Junction Algebra

Thread Previous | Thread Next
Damian Conway
March 29, 2009 13:58
Re: Junction Algebra
Message ID:
Richard Hainsworth conjectured:

> 1) Is the following true for an any junction?
> any( ... , any('foo','bar')) === any(...,'foo','bar')
> If yes, then
> if an 'any' junction is contained in an outer 'any', the inner 'any' can be
> factored out?

Yes. More precisely, an 'any' that is directly nested inside another
'any' can be flattened.
By "directly", I mean with no intervening levels of non-'any'
junctions. That is, not like:  any(...,all(...,any('foo', 'bar')))

> 2) Also, is the following true for nested 'all' junctions? viz.
> all(... , all('foo', 'bar')) === all(...,'foo','bar')

Yes, with a similiar "directly" caveat, as above.

> 3) Conjecture: The following is true of all junction types, eg.,
> junc(..., junc(...)) === junc(..., ...)

No. As Patrick so ably pointed out, this is not true for 'one' nor for 'none'


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About