Re: [stack] Re: unary functions from X to Y?

Chris Double <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Fri, Mar 6, 2009 at 7:30 PM, Justin Pombrio <[email protected]> wrote:
> For instance, suppose 'two!' takes any stack and produces a stack with just
> one element, '2'. Then 'f two!' should produce the stack '2' for all terms
> f. But:
>
> 3 abort two! == 3
> 3 => two! == 2 3.
>

I'm not sure this is correct for XY. 'f two!' for XY, where f is any
term,  will always produce a stack '2'. The example you give is
effectively:

> two! 3 == 2 3

This is because the '3' is appended to the tail of the queue. Which
then gets executed. The function 'two!' is still give a stack (which
is empty) and returns a stack containing 2.

Chris.
-- 
http://www.bluishcoder.co.nz
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.