caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Request: matrix_init function in Array
@ 2003-02-10 18:52 Brian Hurt
  2003-02-10 23:22 ` Pierre Weis
  0 siblings, 1 reply; 21+ messages in thread
From: Brian Hurt @ 2003-02-10 18:52 UTC (permalink / raw)
  To: Ocaml Mailing List

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2003-02-20 16:16 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-10 18:52 [Caml-list] Request: matrix_init function in Array Brian Hurt
2003-02-10 23:22 ` Pierre Weis
2003-02-11  2:37   ` Chris Hecker
2003-02-13  8:33     ` Pierre Weis
2003-02-13 16:50       ` Chris Hecker
2003-02-13 17:13         ` feature priorities (was Re: [Caml-list] Request: matrix_init function in Array) Ed L Cashin
2003-02-14 17:52           ` brogoff
2003-02-14 20:22             ` rich
2003-02-16 23:07               ` Alessandro Baretta
     [not found]                 ` <Pine.LNX.4.53L.0302170500360.32142@ontil.ihep.su>
2003-02-17 22:27                   ` Alessandro Baretta
2003-02-19  9:18           ` [Caml-list] Re: feature priorities (multithreading) James Leifer
2003-02-19 16:46             ` cashin
2003-02-19 17:14               ` Ranjan Bagchi
2003-02-19 17:45                 ` Brian Hurt
2003-02-19 18:17                   ` Will Benton
2003-02-19 19:26                     ` Brian Hurt
2003-02-19 17:25               ` Brian Hurt
2003-02-19 17:26                 ` Noel Welsh
2003-02-20  8:00               ` Michel Schinz
2003-02-20 16:26                 ` Brian Hurt
2003-02-13 17:38         ` [Caml-list] Request: matrix_init function in Array Brian Hurt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).