[Types-sig] Re: decl f: def(_T, _T) -> _T (fwd)

Greg Stein gstein@lyra.org
Mon, 20 Dec 1999 10:38:24 -0800 (PST)


misfire... redirecting...

---------- Forwarded message ----------
Date: Tue, 04 Apr 2000 15:30:21 +0100
From: Edward Welbourne <eddyw@lsl.co.uk>
To: gstein@lyra.org
Subject: Re: decl f: def(_T, _T) -> _T

Hey ! I remember that type.  Ponder calls it Boolean.

def true(this, that): return this
def false(this, that): return that
def or(this, that):
    return lambda i,a,_i=this,_a=that: _i(i,_a(i,a))
def and(this, that):
    return lambda i,a,_i=this,_a=that: _i(_a(i,a),a)

wow ! the rest of the type transcribes cleanly too ;^>

I like the spec (of course, I want to change it, too).
More comments to the list when I've read more (notably, I see Tim
Peters has responded ...)

A suggestion:

decl f(_T): def(_T, _T) -> _T

that is, the `foralltype' names are parameters of the decl ?

	Eddy.
-- 
I believe in getting into hot water; it keeps you clean.
			-- G. K. Chesterton.