Version française
Home     About     Download     Resources     Contact us    

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

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