Hi all,

I realized that the three words bi-curry bi* drop are sufficient to
form a turing complete concatenative language. Here is how we can
build common words out of them,

: dip [ ] bi* ;
: nip [ drop ] dip ;
: call [ [ ] ] dip [ drop ] bi* ;
: bi@ dup bi* ;
: bi bi-curry [ call ] bi@ ;
: dup [ ] [ ] bi ;
: 2bi bi-curry bi ;
: curry [ [ ] ] dip [ ] bi-curry drop ;
: swap [ nip ] [ drop ] 2bi ;

Using drop, dup, swap and dip, any stack shuffle can be formed, and
using curry and call, we can do Church encoding of booleans, and cook
up if, etc.

Slava

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to