[REBOL] Re: [none idiom found?] The best shortcut word for "not none?"
From: lmecir::mbox::vol::cz at: 8-Sep-2006 9:19
Hi Frank, welcome back!
> Anton Rolls <anton-wilddsl.net.au> schrieb:
>> Looks good to me.
>> I think it can't be further optimized.
> Maybe something like this?
> switch1: func [
> "Selects a choice and evaluates the first block that follows it."
> value "Value to search for."
> cases [block!] "Block of cases to search."
> /default case [block!] "Default case if no others are found."
> do any [
> all [
> value: find cases value
> value: find next value block!
> first value
thanks, using your version. FYI, Carl wants to introduce a suitable
refinement to SELECT to support this SWITCH.