>> list: []
== []

>> reduce ['a copy ["a"]]
== [a ["a"]]

>> append list [a ["a"]]
== [a ["a"]]

>> list
== [a ["a"]]

>> append list [b ["b"]]
== [a ["a"] b ["b"]]

>> list
== [a ["a"] b ["b"]]

>> select list 'a
== ["a"]

>> append select list 'a "a-test"
== ["a" "a-test"]

>> list
== [a ["a" "a-test"] b ["b"]]


>>find list select list 'a ; no good find can't find the reference to the
block

Brett.

append/only doesnt seem to help.
basically, select is going to return the element
after the position found.  Note that it doesn't
return the position of that element, it actually
returns the element itself.  Then you are  appending "a-test" to that.
then your select statement returns a block and you are searching
for a block with find.

>> find [[a][b]] [a]
== none

this seems to indicate that you can't search for a block in Rebol with find?

>> find [a b] [a]
== [a b]
I did that by mistake, and it worked!?

I should have done this:
>> find [a b] 'a
== [a b]

>> find [[a][b]] [[a]]
== [[a] [b]]
that was weird.
it found the block.

So here is one fix for it, apparently.
Why it should be necessary, I don't know.
It's as if when you specify a search parameter x,
and it's a block, rebol will grab first x and try to find that.

>> find list reduce [select list 'a]
== [["a" "a-test"] b ["b"]]

-Galt


Reply via email to