Browse thread
Syntactical Array constructor evaluating elements from right to left - Why?
- Jakob Lichtenberg
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2007-09-19 (17:31) |
From: | Jakob Lichtenberg <jakobl@w...> |
Subject: | Syntactical Array constructor evaluating elements from right to left - Why? |
Why is the syntactical array constructor [| ... |] evaluating elements from right to left: # let f i = (Printf.printf "%d\n" i; i);; val f : int -> int = <fun> # Array.init 3 f;; 0 1 2 - : int array = [|0; 1; 2|] # [| f 0 ; f 1; f 2|];; 2 1 0 - : int array = [|0; 1; 2|] Thanks, - Jakob