next exercise ;-)
[1/4] from: koopmans::itr::ing::nl at: 24-Oct-2001 14:05
OK,
Now I know how to access myself.
Can I access the way I am called (with what refinements, etc.) all at once.
So without a parse rule or a bunch of ifs or so...
--Maarten
[2/4] from: jelinem1:nationwide at: 24-Oct-2001 8:10
There is no built-in way to pass refinements. You will have to create your
own mechanism to do this, or use one of the several that people have
brain-stormed in previous posts.
- Michael
Maarten Koopmans <[koopmans--itr--ing--nl]>
Sent by: [rebol-bounce--rebol--com]
10/24/01 07:05 AM
Please respond to rebol-list
T
To: [rebol-list--rebol--com]
cc:
bcc:
Subject: [REBOL] next exercise ;-)
OK,
Now I know how to access myself.
Can I access the way I am called (with what refinements, etc.) all at
once.
So without a parse rule or a bunch of ifs or so...
--Maarten
[3/4] from: lmecir:mbox:vol:cz at: 24-Oct-2001 15:33
Can't you ask easier questions?
A modification of APPLY might be of some use...
apply-with-path: transp-func [
f [any-function!]
refinements [block!]
arguments [block!]
] [
use [self path call args] copy/deep [
self: :f
args: arguments
path: make path! 1 + length? refinements
insert :path 'self
insert tail :path refinements
call: make block! 2 + 2 * length? args
insert call reduce ['local-return :path]
loop length? args [
insert tail call reduce [:first copy/part args 1]
args: next args
]
call
]
]
...
[4/4] from: koopmans:itr:ing:nl at: 24-Oct-2001 15:47
No, I can't ;-)
The thing is that what I want is to get a refinements block in stead of
passing it.
So... I gues I'll have to bluntly test.
--Maarten