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
[Caml-list] function type confusion (using let)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-09-03 (05:52)
From: Michael Leary <leary@n...>
Subject: Re: [Caml-list] function type confusion (using let)
I always think of something right after I ask... which is why I ask, I

Well, this compiles, but looks funny:

let normr r =
  let x = mod_float r pi2 in
  match x > 0.0 with
  | true ->
      if x > pi then
        -.pi2 +. x
  | false ->
      if x < -.pi then
        pi2 +. x

Is there a different way?

Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr