Hi Ed,
Since there's only one local variable wouldn't it be better with 'bake'?
: $predicate ( element -- )
first "predicating" word-prop
{
{ $values { "object" object } { "?" "a boolean" } }
{ $description "Tests if the object is an instance of the " {
$link , } " class." }
} bake print-element ;
Slava
On Wed, Sep 10, 2008 at 6:14 AM, Eduardo Cavazos <[EMAIL PROTECTED]> wrote:
>
> Here's the current implementation of '$predicate' :
>
>
> : $predicate ( element -- )
> { { "object" object } { "?" "a boolean" } } $values
> [
> "Tests if the object is an instance of the " ,
> first "predicating" word-prop \ $link swap 2array ,
> " class." ,
> ] { } make $description ;
>
>
> Here's a much better version:
>
>
> : $predicate ( element -- )
>
> { "object" object } { "?" "a boolean" } $values
>
> first "predicating" word-prop -> CLASS
> { "Tests if the object is an instance of the " { $link CLASS } " class." }
> $description ;
>
>
> * Uses the now available locals in literals support
> * No use of make
> * Uses my proposed '->' syntax
>
>
> Ed
> (who is currently making jihad against 'make')
>
> -------------------------------------------------------------------------
> 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