Re: [stack] Looking for a combinator name
"Christopher Diggins" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
Just found a name at : http://tunes.org/~iepos/joy.html Brent calls it "sap". - Christopher On Sun, Dec 7, 2008 at 12:28 PM, Christopher Diggins <[email protected]> wrote: > On Sun, Dec 7, 2008 at 8:08 AM, John Nowak <[email protected]> wrote: >> On Dec 6, 2008, at 8:42 AM, Christopher Diggins wrote: >> >>> I am looking for a name for a combinator that is equivalent to: >>> >>> In Cat: dip apply >>> Or in Joy: dip i >> >> I can't say that I understand what you'd use this for and hence I'm >> having trouble coming up with a name. I've often used 'dup dip i' (aka >> 'twice'), but never just 'dip i'. Do you have a more concrete example? > > No I don't. I have only seen it when refactoring concatenative code. > > Lets call it q for a second: > > ... [a] [b] q => ... b a > > I believe the following is the applicative form: > > \abc.b(a(c)) > > Another way of writing it is: > > q = swap compose apply > > or in Joy: > > q = swap cat i > > - Christopher >