Version franēaise
Home     About     Download     Resources     Contact us    
Browse thread
Annoying behaviour of OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Thomas Fischbacher <tf@f...>
Subject: Re: [Caml-list] Annoying behaviour of OCaml
Eric Cooper wrote:

>>compare [|1;2;3|] [|4;5|];; (* ...but actially is not: this gives 1,
>>			       supposedly because the second list is
>>			       shorter than the first.
>>			    *)
> 
> This is indeed unexpected behavior:
>     # compare "123" "45";;
>     - : int = -1
>     # compare [1;2;3] [4;5];;    
>     - : int = -1
>     # compare [|1;2;3|] [|4;5|];;
>     - : int = 1

Ah, yes, many thanks. I mixed up some things in my bugreport - but this
shows the issue fairly well.

-- 
best regards,
Thomas Fischbacher
t.fischbacher@soton.ac.uk