Correcting myself:

> to be a solution, HARD must pass any test. Let's try:
>
arg1: func [x] [return make error! x]
arg2: ["some error"]
probe disarm arg1 first arg2

The result is:

make object! [
    code: 800
    type: 'user
    id: 'message
    arg1: "some error"
    arg2: none
    arg3: none
    near: [return make error! x]
    where: none
]

> while the result of HARD is:
>

probe disarm hard :arg1 arg2
** User Error: some error
** Near: return make error! x

> The question is, if HARD could really meet the requirements.
>
> > Hi Ladislav
> >
> > Sounds like fun!  Will this solve the puzzle?
> >
> > >> hard: func [x y][do reduce [x first y]]
> > >> hard :sine [52]
> > == 0.788010753606722
> > >> hard func [x][x * x] [52]
> > == 2704
> > >>
> >
> > Cheers
> > -Larry
> >
> > ----- Original Message -----
> > From: Ladislav Mecir <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, February 03, 2001 11:03 AM
> > Subject: [REBOL] A hard question
> >
> >
> > > The task is to create a function HARD, that is a Normal Argument
Passing
> > > function (i.e. nor a Fetched Argument Function, neither an Unevaluated
> > > Argument Function) and takes two arguments, ARG1 and ARG2. HARD is not
> > > required to do any argument checking, moreover, you can assume, that
the
> > > supplied arguments are really the data they are supposed to be.
> > >
> > > ARG1 is a Normal Argument Passing Function taking exactly one
argument.
> > >
> > > ARG2 is a block of length 1.
> > >
> > > The function HARD shall do exactly the same thing, as the function
ARG1
> > > would do if used with the first element of ARG2 as its argument.
> > >
> > > Moreover, you can assume, that the first element of ARG2 is a correct
> > > argument to ARG1.
> > >
> > > Any trials?
> > >
> > > Regards
> > >      Ladislav


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to