# Fwd: [Factor-talk] Another simple turing-complete subset of Factor

## Adam — 2009-02-10 01:39:31

    Cross-post to concatenative.

    ---------- Forwarded message ----------

    From: Slava Pestov <slava@...>

    Date: Sun, Feb 8, 2009 at 6:42 PM

    Subject: [Factor-talk] Another simple turing-complete subset of Factor

    To: factor-talk@...

    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

    Factor-talk@...

    https://lists.sourceforge.net/lists/listinfo/factor-talk