Re: [stack] What does "concatenative" actually mean?
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Mar 6, 2009, at 6:11 PM, Don Groves wrote: > On Mar 6, 2009, at 12:19 AM, spir wrote: > >> [1 2 3] [dup *] map >> :square dup * >> [1 2 3] [square] map > > You may get disagreement on this point from others here but > not from me. As in Lisp, you can use an anonymous function, > like [dup *], or you can name it and refer to it by name and get > the identical result. So, yes, I consider [dup *] to be a lambda. It's not a lambda. Quotation and lambdas have a similar use, but they're not the same thing. Your point about naming it and being able to refer to it is confused. Even if you define 'square', you still need to use quotation to form a new function that pushes the 'square' onto the stack. It is not the same as giving the name for a function in Scheme and getting that function back as a result. You're explicitly creating a new function. - John