Now i've understand. That function exists: it is 'do also if we can't write it.
I'll think it. --- Ciao Romano ----- Original Message ----- From: "Ladislav Mecir" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 16, 2001 4:35 PM Subject: [REBOL] Re: func args by ladislav > Hi Romano, > > I don't think, I must change your mind, but there is a difference you > probably don't see. It is possible to define a Rebol function (a FUNCTION! > datatype value to be exact), that takes one argument and evaluates it: > > do-f-0: func [f] [ > f > ] > > 1) DO-F-0 is able to evaluate any zero-argument function supplied as the F > argument. > 2) DO-F-0 is unable to evaluate any one-or-more-argument function supplied > as the F argument > > Similarly it is possible to define a function that takes two arguments and > evaluates the first one supplying it the second one as its argument: > > do-f-1: func [f arg1] [ > f :arg1 > ] > > do-f-2: func [f arg1 arg2] [ > f :arg1 :arg2 > ] > > etc. > > 3) I think, that we are in agreement, how many arguments the above defined > functions take. It is evident, that for a Rebol function to evaluate its F > argument, the function must take n + 1 arguments, where n is the number of > arguments of F. > 4) Can you write a Rebol function (a FUNCTION! datatype value) able to > evaluate any F (i.e. F with any number of arguments) without cheating, i.e. > without "packing" the arguments into a block? > > Cheers > Ladislav > > > -- > To unsubscribe from this list, please send an email to > [EMAIL PROTECTED] with "unsubscribe" in the > subject, without the quotes. > -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
