Well, you could do this:
( scratchpad ) all-words [ stack-effect (( x p q -- )) effect= ] filter
But, it only checks for arity (meaning it would match an effect (( a b c --
)) also).
If you want to check the stack names in the effect, you can do this:
: my-effect= ( effect1 effect2 -- ? )
{ [ effect= ] [ [ in>> ] bi@ = ] [ [ out>> ] bi@ = ] } 2&& ;
( scratchpad ) all-words [ stack-effect (( x p q -- ) my-effect= ]
filter .
{ bi }
On Thu, Nov 10, 2011 at 9:03 AM, missingfaktor
<rahul.phulore....@gmail.com>wrote:
> Does Factor have a word for searching words given a stack-effect?
>
> Something like:
>
> (( x p q -- )) words-with-stack-effect
>
> will list out 'bi' and other words with that effect.
>
> --
> Cheers,
> missingfaktor <http://twitter.com/#!/missingfaktor>.
>
> When you stand for what you believe in, you can change the world.
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk