# Concern about the "Theory of Concatenative Combinators"

## Christopher Diggins — 2006-11-21 00:55:25

    I've been studying up on SK calculus lately and I believe I have found

    some apparent discrepancies between various articles and and Brent

    Kerby's paper "Theory of Concatenative Combinators" which have me

    concerned.

    Brent suggests that the "K" combinator from classical combinatorial

    theory can be implemented as

    k == [zap] dip i

    But this is conflicting with other interpretations of the K

    combinator, which is that it creates a function which ignores its

    input and returns a constant value. Brent's implementation is

    different: it takes a quotation and returns the contents while

    removing the item below it on the stack. In other words:

    [B] [A] k == A

    where what classical theory seems to indicate something different:

    A k == [zap A]

    I would suggest then that the k operator perhaps should be implemented as:

    k == [zap] append

    This problem might reveal itself more clearly if I use the Cat type

    system to explain the differences. Brent's implementation of k has

    type:

    k : ((A:any)->(B:any*) C A) -> (B)

    Where the literature suggests the type of k as:

    k : (A:any)->((B:any)->(A))

    I could be mistaken in all of this and I am open to criticism.  Either

    way it doesn't detract from the usefuleness or cleverness of Brent's

    paper. I think it is a very interesting and helpful paper. It just

    appears to me that it is important to draw the distinction between

    classical theory and his concatenative combinators when appropriate.

    My apologies if I have made any mistakes.

    - Christopher

## Christopher Diggins — 2006-11-21 04:46:15

    Well I should have known better. It really looks like I missed the

    mark on this one. Everything I wrote in the post is wrong!

    Sorry for wasting everyone's time. :-(

    - Christopher

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

    From: Christopher Diggins <cdiggins@...>

    Date: Nov 20, 2006 4:55 PM

    Subject: Concern about the "Theory of Concatenative Combinators"

    To: concatenative <concatenative@yahoogroups.com>

    I've been studying up on SK calculus lately and I believe I have found

    some apparent discrepancies between various articles and and Brent

    Kerby's paper "Theory of Concatenative Combinators" which have me

    concerned.

    Brent suggests that the "K" combinator from classical combinatorial

    theory can be implemented as

    k == [zap] dip i

    But this is conflicting with other interpretations of the K

    combinator, which is that it creates a function which ignores its

    input and returns a constant value. Brent's implementation is

    different: it takes a quotation and returns the contents while

    removing the item below it on the stack. In other words:

    [B] [A] k == A

    where what classical theory seems to indicate something different:

    A k == [zap A]

    I would suggest then that the k operator perhaps should be implemented as:

    k == [zap] append

    This problem might reveal itself more clearly if I use the Cat type

    system to explain the differences. Brent's implementation of k has

    type:

    k : ((A:any)->(B:any*) C A) -> (B)

    Where the literature suggests the type of k as:

    k : (A:any)->((B:any)->(A))

    I could be mistaken in all of this and I am open to criticism.  Either

    way it doesn't detract from the usefuleness or cleverness of Brent's

    paper. I think it is a very interesting and helpful paper. It just

    appears to me that it is important to draw the distinction between

    classical theory and his concatenative combinators when appropriate.

    My apologies if I have made any mistakes.

    - Christopher