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
How to do this properly with OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-22 (17:38)
From: Eric Cooper <ecc@c...>
Subject: Re: [Caml-list] How to do this properly with OCaml?
On Fri, Jul 22, 2005 at 04:26:55PM +0200, Thomas Fischbacher wrote:
> [...]
> The very same problem appears in a different guise when one tries to write 
> a function that flattens 'a array array -> 'a array. The best I could 
> come up with here is:
> [...] 
> Could anyone please tell me how to do all this in a more appropriate way?

let join_arrays aa = Array.concat (Array.to_list aa)

(although Array.concat in the standard library is basically equivalent
to your code)

Eric Cooper             e c c @ c m u . e d u