REBOL.net

Re: Newbie question about func refinements

Gabriele Santilli (santilli.gab
13-Aug-2008/18:18:36-4:00
#44201
<Back   Thread   Next>
<Back   Index   Next>

On Wed, Aug 13, 2008 at 10:14 PM, Ed O'Connor <edoconnor-gmail.com> wrote:

> Is there a way to dynamically obtain a refinement value so I can use it in a
> switch statement?
> In the example above, the pseudo-code expression "self/refinement" is what
> I'm looking for.

You can't, refinements are not mutually exclusive in general.

(Refinements should not change the meaning of the function, just
refine its functionality.)

You can use CASE though to do something like what you describe rather easily.

HTH,
    Gabriele.


<Back   Thread   Next>
<Back   Index   Next>

REBOL.com