Ed,

I'm afraid you misread his code. [ call ] 2all? takes an array and a
sequence of predicates, and checks if the corresponding elements of
the array satisfy the quotation.

So it's equivalent to

first3 [ integer? ] [ string? ] [ string? ] tri* and and

Your code is equivalent to

[ integer? ] [ string? ] [ string? ] tri and and

Which is always false since integer /\ string = empty-set :-P

We don't have a macro for Phil's idiom yet. Something somewhat similar
comes up in extra/usa-cities:

        7 firstn {
            [ string>number ]
            [ ]
            [ string>state ]
            [ string>number ]
            [ string>number ]
            [ string>number ]
            [ string>number ]
        } spread city boa

Not sure if its worth having an abstraction, but its something to keep
in the back of your mind.

Slava

On Sat, Jul 19, 2008 at 5:26 PM, Eduardo Cavazos <[EMAIL PROTECTED]> wrote:
> Phil,
>
> This version works for me:
>
> PREDICATE: s>po-clause < array
>     { [ integer? ] [ string? ] [ string? ] } 1&& ;
>
> Ed
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to