Re: [stack] Meta-combinators?

"Christopher Diggins" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
That's an interesting usage, thanks Chris.

On 1/24/07, Chris Double <[email protected]> wrote:
>
>   On 1/25/07, Christopher Diggins <[email protected]<cdiggins%40gmail.com>>
> wrote:
> > The more general problem is how to construct a combinator which can
> > curry all arguments for any given function. Stated differently the
> > challenge is to write a function which can compute the number of
> > arguments or number of results of any given function.
>
> In Factor you can find the stack effect of most words using 'infer'.
> 'infer' can compute a quotations stack effect based on the effects of
> the words in quotation. From this you can write a word that curries
> the correct number of arguments to the word.
>
> The LAZY: word in the lazy lists library for example uses the stack
> effect of the word to curry the arguments onto the words quotation to
> do lazy evaluation.
>
> Another option in Factor is to use 'datastack' and 'set-datastack'.
> These words let you get access to the stack directly and could be used
> to save/restore as needed.
>
> Chris.
> --
> http://www.bluishcoder.co.nz
> 
>



-- 
http://www.cdiggins.com


[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.