Hello, I am not sure I remember what was said exactly, and I'm quite too lazy to check, but I remember that someone gave a possible implementation with Obj.magic ? This also is about the same as the Printf functions which can take a variable amount of arguments and need a bit of tinkering, and I remember a function 'eat", taking an integer n, which would ignore the n first arguments given to the function. Now, if you have this, getting the first argument should be possible after looking at the printf source :) (although I could not find it searching in my mails, sorry)
Actually, I've just glanced at the source and there _is_ a "get_arg" function, taking a single integer and returning an Obj.magic'ed item which would most likely be the nth argument of a function - however I can't separate the function from the rest of the code properly in just a minute, but it definitly is a place to look at if you need such a function... Although it might be quite dangerous. But as it was said, the type is impossible to represent and magic is probably necessary without typing multiple calls to functions manually; but Jeremy's solution could be enough :) Good luck, Dominique Martinet _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
