Tom Pledger wrote:
> I don't know whether this is a shining example of an advantage,
> and am keen to see other comments.
For what it's worth, I've pulled some snippets from some code I wrote.
I wanted three recursive types which were nearly identical (Exp,ExpQv,ExpPr
k e
-> [e] and even replMin on the information that's there in the type.
-- Dave
-Original Message-
From: Tom Pledger [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 21, 2001 7:25 PM
To: [EMAIL PROTECTED]
Subject: Recursive types?
David Bakin writes:
| I'm having trouble underst
David Bakin writes:
| I'm having trouble understanding recursive types (e.g., as described in
| Functional Programming with Overloading and Higher-Order Polymorphism by
| Jones.
|
| He gives as an example
|
|
| > data Mu f = In (f (Mu f))
|
| > data NatF s = Ze
I'm having trouble
understanding recursive types (e.g., as described in Functional Programming
with Overloading and Higher-Order Polymorphism by
Jones.
He gives as an
example
> data Mu f = In
(f (Mu f))
> data NatF s =
Zero | Succ s
> type Nat = Mu
NatF
Amon
The following functions are written in my strict, weakly typed language Navel.
They enable the pure functional representation of queue disciplined structures:
def qupdate key value rest =
lam k v.(if k=key
then value:(qupdate key value rest)
else
l