In Rebol2, R3-Alpha, and Red...doing a FIND searching for a TYPESET! will give you the first instance of that type in a block:
>> find [1 2 "abc" 3 4] any-string! == ["abc" 3 4] >> find [1 2 <abc> 3 4] any-string! == [<abc> 3 4]
One would think that you'd be able to search for the typeset literally by using /ONLY. But that doesn't work (though Red says they addressed this recently)
Why Wasn't This Taken Further?
Trying to FIND a function is pretty rare. So why didn't they make it so that passing a function to FIND makes it search?
>> find [1 2 3 4] func [x] [x > 2] == [3 4]
If a function took multiple arguments, that could be asking it to effectively /SKIP and group items at a time:
>> find [1 2 4 3 5 6] func [a b] [a > b] == [4 3 5 6]
/ONLY could have worked for finding a function literally:
>> find/only reduce [:positive? :zero? :negative?] :zero? == [#[native! zero?...] #[native! negative?...]]
Ren-C goes with QUOTED! vs. /ONLY, but same basic premise
>> find [1 0 2 0] :zero? == [0 2 0] >> find reduce [:positive? :zero? :negative?] quote :zero? == [#[native! zero?...] #[native! negative?...]]
Though It Seems Easy To Make Mistakes...
People are invariably going to write find data value...think it works for a few values they try...and assume it works for others. Redbols are notorious for pulling the rug out from under you with such things.
But if you're willing to do this for typesets, I don't see why doing it for functions is that much worse.
Just something to think about.