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
[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:  FAQ:
To unsubscribe, mail  Archives: