Re: [stack] Re: Some thoughts on Object Cat

"Christopher Diggins" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
Emphasis mine:

> ... So the effect of *applying* the function [foo] to stack S is that we get S [foo] as the
> new stack.

And the effect of calling "i" afterward is the same as applying the
function "foo" to the stack S.

> The i function does not apply a function to the rest of the stack, but evaluates in turn all the functions in the list at the top of the stack, thus implicitly composing them.

These two approaches are not incompatible. There are two equally valid
semantic views of a Joy program: compose all functions then apply the
resulting function to the empty stack, or apply each of the functions
to the stack in sequence.

// My approach
S x0 [x1 x2] i == (x2.x1)(x0(S))

// Your approach
S x0 [x1 x2] i == ((x2.x1).x0)(S)

It is important to note that evaluating a Joy program ultimately
requires an application at the top level. This is because the output
of a Joy program is a stack, not a function.

- Christopher
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.