[REBOL] Re: [refinements] Mutually exclusive refinements
From: Izkata:Comcast at: 14-Aug-2004 19:51
----- Original Message -----
From: "Ashley Trüter" <[atruter--labyrinth--net--au]>
To: <[rebolist--rebol--com]>
Sent: Saturday, August 14, 2004 7:47 PM
Subject: [REBOL] [refinements] Mutually exclusive refinements
> Here's my attempt at handling mutually exclusive refinements without usin
> g
> nested 'either.
>
> f: func [/a /b /c /d /e][
> print switch/default true compose [
> (a) ["A"]
> (b) ["B"]
> (c) ["C"]
> (d) ["D"]
> (e) ["E"]
> ]["?"]
> ]
>
> Anyone come across a better way?
Hey, you just taught me a little about functions and refinements.. But -
>> f/b/c/d
B
Would it be better to use 'if ? Or is that the result you wanted?