Hi, Paul,
Several other folks have given good, comprehensive explanations. I
might add a simple trick; read
any [...]
as if it were a synonym for
first_established_value_in [...]
where "established" means something other than none or false. It's
saying "try these in this order, and
Paul Tretter wrote:
> Can someone explain this. It may be incorrect but it seems the find
function is not going to return any value of "data:".
>> data: [123 456 789]
== [123 456 789]
>> print any [find data 432 999]
999
>> print any [find data 456 999]
456 789
It's correct! Perhaps a better exa
Hi Paul
The example you give executes correctly and returns 999. Here's why. The ANY
function evaluates the sub-expressions in it's block argument and returns
when it encounters the first expression which does not yield FALSE or NONE.
In the example FIND data 432 returns NONE. This fails the crit
Hi Paul,
What the example is supposed to illustrate is that even though find returns
none,
>> find data 432
== none
- after all, you can't expect to find 432 in a block that doesn't contain
432 -
due to the fact 'any ORs its argument block, you will still get some
"valid" result other than no