Am 10.06.2008 um 16:00 schrieb Eduardo Cavazos:

>
> Crest da Zoltral wrote:
>
>> I implemented && || with variable artiy a while ago passing the artiy
>> to && and || altought i called them differently.
>>
>> 10 { [ even? ] [ 10 = ] [ 20 < ] } 1&&
>>
>> would be
>>
>> 10 { [ even? ] [ 10 = ] [ 20 < ] } unary all?
>>
>> if anybody is interessted i will publish the code as soon as i  
>> cleaned
>> it up.
>
> Nice!
>
> I was thinking about a similar approach, except somehow using  
> 'with'. Of
> course, 'with' would have to be enhanced to work with sequences (of
> quotations) as well as with quotations. I haven't checked if this is
> feasible.

I'm reimplementing it right now one problem is that I implemented  
every? as [ negate ] dip any? not with won't work with generalized  
booleans.

> Yet another approach is the "smart combinator" way. I.e. have a  
> general '&&'
> which would use 'infer' to figure out the arity. I think the plan is  
> to
> explore these kinds of combinators eventually. It seems that for &&  
> and ||,
> smart versions would be pretty straightforward.

Nice idea but I'm afraid this would lead to problems with recrusive  
quotations making it a leaking abstraction.

> Slava, what do you think? Would smart versions be OK to use here?

I'm not Salva but I think it would create more problems than it's  
worth. If unary any? ist to much to type just define 1any?.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to