[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SETF and LAMBDAs (semi-serious?)



All this discussion about the power of SETF has reminded me of an
idea that I've been toying with for awhile.  Basically, I'd like
to modify the lambda calculus to allow non-atomic "arguments" for
the lambda.  So, in addition to things like:

    (lambda (x)
      (lambda (y)
        x))

(the K combinator, I think), it would also be legitimate to have
things like:

    (lambda (x)
      ((lambda ((y x)) (y x))
        x))

(which I think would be the identity function).

I don't claim that there's any good reason for doing this--it just seemed
like a natural thing to do during one of my weirder moments.  If anyone
knows if work has already been done with this funny variant of the lambda
calculus, I'd be interested in hearing about it.

On the other hand, if we leave the world of pure mathematical systems and
enter the world of Lisp, it does kind of appeal to me to be able to write
code like:

    (let (
          ((elt v 0) (length v)))
      v)

but, I'm not seriously suggesting that it be implemented...

-- Will Galway
-------