Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Lambda-Term (f x) (x f) translated to Ocaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Thomas Fischbacher <Thomas.Fischbacher@P...>
Subject: Re: [Caml-list] Lambda-Term (f x) (x f) translated to Ocaml?

> I guess that this is not a lambda term that can be typed.
> There are many of them. A famous one is the Y combinator.
> The _typed_ lambda calculus does not allow all the lambda terms
> of the (normal) lambda calculus.

# let rec y f = f (y f);;
val y : ('a -> 'a) -> 'a = <fun>

-- 
regards,               tf@cip.physik.uni-muenchen.de              (o_
 Thomas Fischbacher -  http://www.cip.physik.uni-muenchen.de/~tf  //\
(lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y)           V_/_
(if (= x 0) y (g g (- x 1) (* x y)))) n 1))                  (Debian GNU)