caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* AW: [Caml-list] Confused
@ 2004-09-15 13:39 Bauer, Christoph
  0 siblings, 0 replies; only message in thread
From: Bauer, Christoph @ 2004-09-15 13:39 UTC (permalink / raw)
  To: 'Jon Harrop'; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 702 bytes --]



> -----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

[-- Attachment #2: Type: text/html, Size: 1743 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-15 13:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-15 13:39 AW: [Caml-list] Confused Bauer, Christoph

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).