On Sep 30, 2011, at 2:53 PM, Michele Pes wrote:

> Hi to all!
> While writing my little factor programs, I often find a situation in
> which I have an object,
> I test it and if test is ok then some action is performed on it, else it
> is simply dropped.
> 
> Ex.: (obj on top of stack)
> dup test-condition [ do something with obj ] [ drop ] if
> 
> I think this would be better expressed this way: (always with obj on top
> of stack)
> [ do-test ] [ do-action-on-obj ] when-drop

The words if* and when* already do this:

do-test [ do-action-on-obj ] [ else ] if*
do-test [ do-action-on-obj ] when*

-Joe

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to