I'm not sure what you mean, but I assume something like this:

    :: foo ( seq -- seq' )
        1 :> temp
        seq [ temp + ] map ;

    IN: scratchpad { 1 3 5 } foo .
    { 2 4 6 }

Yes, that works.

If thats not what you meant, can you clarify?

On Fri, Jul 3, 2015 at 3:58 PM, Hugh Aguilar <hughaguila...@yahoo.com>
wrote:

> Is it true that in Factor the quotation has access to the parent
> function's local variables?
>
> Over on comp.lang.forth Bernd Payson has said that in Factor quotations do
> not have access to the parent function's local variables --- he uses this
> argument to justify that his "quotations" (just :NONAME with some syntactic
> sugar) don't need to have access to the parent function's locals.
>
> Anyway, in LOTD my quotations have access to the parent function's local
> variables.
>
> regards --- Hugh
>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to