o Implement this_function().
to add to the discussion, (what i learned at the conference) this_function() is mostly usefull in hilfe-like situations,
I guess this is the computer science way of defining this_function:
function fac = Y (lambda (function this_function, int x)
{ return (x == 0) ? 1 : x * this_function(x - 1); });
Result: `()
fac(17);
Result: 355687428096000
All you need is to first define this general but strange-looking function:
function Y(function f)
{ return lambda(mixed y) { return (lambda(function x, mixed w) { return f(lambda(mixed z) { return x(x, z); }, w); }) (lambda(function x, mixed w) { return f(lambda(mixed z) { return x(x, z); }, w); }, y); }; }
It took me quite a while to try to remember what the function looks like, and then write it in pike ;-)
/ Niels Möller (igelkottsräddare)
Previous text:
2003-10-05 11:35: Subject: Re: Some tasks from the conference
On Thu, Oct 02, 2003 at 05:10:04PM +0200, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
o Transfer the pike-community.org contents to a Steam server c/o Martin Baehr.
i have received a huge mail (45 times by now ;-| and will start to disect that soon...
o Add a function or option to create_process that conveniently starts a pike interpreter with another pike script.
shouldn't this mean "with the same pike script" ?
o Add a function to change the argv array of the pike process.
is this the way it is done in c? i thought changing argv was just a convenience method in perl.
for pike i am guessing the better way is to have a function like System.set_process_name(string)
o Implement this_function().
to add to the discussion, (what i learned at the conference) this_function() is mostly usefull in hilfe-like situations, and it is also limited to simple recoursions. (doesn't help in situations where a() calls b() and b() calls a()...
greetings, martin.
/ Brevbäraren