I wrote:
> ...made a shorter and quicker version, which I call 'Find_Word. More
later.
Actually, I've decided to change the name to 'Find_Words. It's attached as
well. It's loosely based on Eric's Huh.r.
Of particular note is the way I've discovered on how to easily pass multiple
refinements through to a function.
Find_Words: function [Value [string!] /Match /Any /Last][Refined_Find Words
Found][
Refined_Find: to path! 'find
if Match [append :Refined_Find 'Match]
if Any [append :Refined_Find 'Any]
if Last [append :Refined_Find 'Last]
Words: first system/words
sort Words
Found: make block! length? Words
foreach Word Words [
if found? Refined_Find to string! Word Value [
append Found Word
]
]
Found
]
>> find_words/match/any "to-*"
== [to-binary to-bitset to-block to-char to-date to-decimal to-email to-file
to-get-word to-hash to-hex to-idate to-integer to
-issu...
Andrew Martin
Sleep REBOL-ing...
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-
Find Words.r