Browse thread
AW: [Caml-list] Confused
- Bauer, Christoph
[
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: | -- (:) |
| From: | Bauer, Christoph <Christoph.Bauer@l...> |
| Subject: | AW: [Caml-list] Confused |
> -----Ursprüngliche Nachricht----- > Von: Jon Harrop [mailto:jon@jdh30.plus.com] > Gesendet: Mittwoch, 15. September 2004 15:29 > An: caml-list@inria.fr > Betreff: [Caml-list] Confused > > > > How come this works: > > # let rec build = function 0 -> [] | n -> 1e-6 :: build > (n-1);; val build : int -> float list = <fun> # let test = 1. > :: build 1000;; val test : float list = ... > > But this does not: > > # let rec build = function 0 -> [] | n -> 1e-6 :: build (n-1) in > let test = 1. :: build 1000;; > Syntax error try let rec build = function 0 -> [] | n -> 1e-6 :: build (n-1) in let test = 1. :: build 1000 in test;; Regards, Christoph Bauer