Browse thread
functions' recursive construction
[
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: | asmadeus77@g... |
| Subject: | Re: [Caml-list] functions' recursive construction |
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