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

Question point fixe
• Pierre Weis
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
 Date: -- (:) From: Pierre Weis Subject: Question point fixe
```From: Vincent Poirriez
Date: Tue, 18 Oct 94 09:43:00 +0100
To: caml-list@pauillac.inria.fr
Subject: Question point fixe

Ci-dessous une question dont j'ai oublie' la reponse:

Pourquoi n'a t'on pas le droit d'e'crire:

let build f =
let g x = expr       (* ou` l'on fait appel a` f *)
in
function y -> expr' (* ou` l'on fait appel a` g *)
;;
let rec monf = build monf;;

L'intere^t de cette e'criture serait d'effectuer les
calculs possibles par l'application partielle alors que
l'ecriture autorise'e:
let rec monf x = build monf x;;
ne les effectue pas

Vincent
(Vincent.Poirriez@inria.fr)

(*I Hope my english isn't too bad*)
Here after, a question that I don't remember the answer:

Why is it impossible to write:
let build f =
let g x = expr       (* where f is called *)
in
function y -> expr' (* where g is called *)
;;
let rec monf = build monf;;

The interest of such a definition is to perform some
calculus in the partial application. These calculus
are not performed in the following allowed definition:
let rec monf x = build monf x;;

Vincent
(Vincent.Poirriez@inria.fr)

```