Browse thread
[Caml-list] Request: matrix_init function in Array
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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)
in
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.
Brian
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners