Re: [stack] function/object ambiguity + quotation alternative

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Mar 3, 2009, at 7:51 PM, John Nowak wrote:

>   ' = -x(n,x.{F,'F})
>    / = +x(i,/F.[c,F.t2])

I forgot to post them with the alternate infix syntax which is kind of  
cute. I'll give a better explanation as well.

'a b c d e' groups to 'a b (c d e)' and is basically another way of  
writing the construction form (this is a lot like J); '.' is  
composition if that wasn't obvious; 'c' selects the third element in a  
list ('a' is the first, 'b' is second, etc); 't2' takes the first two  
elements of the list passed to it; 'x' is cons; {} is "spread":

    ' = n -x x.{F,'F}
    / = i +x c /F F.t2

I think they're a lot better than the equivalent definitions in Joy or  
Factor. Certainly less unrelated words needed.

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