English version
Accueil     Ŕ propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis ŕ jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml ŕ l'adresse ocaml.org.

Browse thread
Parameter evaluation order
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-08-24 (01:27)
From: Hao-yang Wang <hywang@p...>
Subject: Re: Parameter evaluation order

>Suppose you want to evaluate a curried function call in left-to-right
>f e1 e2 e3 e4
>You must evaluate f first, then e1.  Then you must apply f to e1, giving
>a new function g1.  Then you must evalue e2, then apply f1 to e2, giving
>f2, etc.

It seems to me that as long as evaluate f the last, we are ok. We can 
specify the evaluation order of the _parameters_ left-to-right (i.e., e1 
then e2, e3, e4, and finally f), without running into the efficiency 

Hao-yang Wang