Re: more match() problems

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek Parnell wrote:

<snip>
>   match() LOOKS FOR SLICES - ALWAYS.
>   find() LOOKS FOR ELEMENTS - ALWAYS.
</snip>

This is entirely correct and is as it should be. I would further emphasize
that find() and match() only work at the top level.

Since match() always looks for slices, an atom as the first parameter is and
should be an error.  An empty sequence as the first parameter is also an
error--a return of 0 is preferable, as it would eliminate some special case
checking from code using match().

-- Mike Nelson

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu