Browse thread
OO programming
[
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: | Dirk Thierbach <dthierbach@g...> |
| Subject: | Re: [Caml-list] OO programming |
On Mon, Feb 25, 2008 at 05:02:22PM +0100, Berke Durak wrote: > Yes that could be nice but it's no biggie IMHO. > > let init n f = > let s = make n (f 0) in > for i=1 to n-1 do > set s i (f i); > done; > s > > let init : int -> (int -> char) -> string = init Nice. I hadn't seen this trick before. You don't happen to know a similar trick that works with methods? - Dirk