# Tiny Typed Concatenative Language

## Christopher Diggins — 2007-05-20 20:15:08

    I've posted the types of the core level-0 primitives of Cat at:

    http://cdiggins.com/2007/05/20/a-very-small-but-non-trivial-typed-concatenative-language/

    This may be of interest to anyone who wants to develop a typed

    concatenative language. Just add a few arithmetic operations, and you

    are off to the races!

    Christopher Diggins

## Joshua Shinavier — 2007-05-20 23:02:16

    On 5/20/07, Christopher Diggins <cdiggins@...> wrote:

     > I've posted the types of the core level-0 primitives of Cat at:

     [snip]

    Very interesting stuff.  Can you give an example of the to_list

    primitive in action?  I'm still getting up to speed on Cat and the

    relationship between programs and generic quotations.

    Best,

    Josh

    to_list 	(( -> 'A) -> list) 	Creates a list from a function that

    accepts no arguments.

## Christopher Diggins — 2007-05-21 00:26:24

    Hi Josh,

    Here are some examples:

    [] to_list == nil

    [1] to_list == 1 unit

    [1 2] to_list == 1 2 pair

    [1 2 pop] to_list == 1 unit

    [1 2 swap] to_list == 2 1 pair

    [1 2 pop pop] to_list == nil

    [1 pop pop] to_list == type error!

    Cheers,

    Christopher

     On 5/20/07, Joshua Shinavier <parcour@...> wrote:

    >

    >   On 5/20/07, Christopher Diggins <cdiggins@...<cdiggins%40gmail.com>>

    > wrote:

    > > I've posted the types of the core level-0 primitives of Cat at:

    > [snip]

    >

    > Very interesting stuff. Can you give an example of the to_list

    > primitive in action? I'm still getting up to speed on Cat and the

    > relationship between programs and generic quotations.

    >

    > Best,

    >

    > Josh

    >

    > to_list (( -> 'A) -> list) Creates a list from a function that

    > accepts no arguments.

    >

    >

    [Non-text portions of this message have been removed]