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] Request: matrix_init function in Array
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <brian.hurt@q...>
Subject: [Caml-list] Request: matrix_init function in Array
Any possibility we could add the following function to the Array module?

val matrix_init : int -> int -> (int -> int -> 'a) -> 'a array array

let matrix_init rows cols f =
    let g i = init cols (f i)
    init rows g

Actually, I'm not sure if the function should be matrix_init or 
init_matrix.  And I don't care either way.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: