This site is updated infrequently. For up-to-date information, please visit the new OCaml website at ocaml.org.

[Caml-list] fixpoint
• John Max Skaller
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
 Date: 2002-08-03 (20:03) From: John Max Skaller Subject: [Caml-list] fixpoint
```Excuse dumb question about lambda calculus.
I'm using a typed lambda calculus for a kinding system
(the types are TYPE, TYPE->TYPE etc).
I'm uncertain how to handle recursion though.
Example:

list a = 1 + a * list a

or

list = fix f . fun a. 1 + a * f a

now we need:

list int = 1 + int * list int

or

list int = fix x . 1 + int * x

which suggests the following reduction:

fix f . fun x . e ==> fix z . e [f x -> z]

Well, the rule works in this case. Will it always work?

--
John Max Skaller, mailto:skaller@ozemail.com.au
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.
voice:61-2-9660-0850

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

```