[cl-containers-devel] darcs patch: When searching for an item in a bst, make sure that th...

Gary King gwking at metabang.com
Fri Mar 6 22:03:58 UTC 2009


Thanks Nathan,

I'll look try at this over the weekend.


On Mar 6, 2009, at 2:51 PM, Nathan Bird wrote:

> On 3/6/2009 12:10 PM, Nathan Bird wrote:
>> Fri Mar  6 11:52:50 EST 2009  Nathan Bird<nathan at acceleration.net>
>>   * When searching for an item in a bst, make sure that the node  
>> isn't a placeholder and actually has an element
>>
> The point of this is that because the red black tree has empty nodes  
> as
> placeholders we need to test for that. Without this searching a red
> black tree for an element it doesn't contain doesn't return null, but
> errors.
>
>> (containers:item-at (containers:make-container
> 'containers:red-black-tree) 1)
>
> Alternatively to testing the element slot directly, there appears to  
> be
> a node-empty-p function that might be more appropriate.
>
> _______________________________________________
> cl-containers-devel mailing list
> cl-containers-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-containers-devel

--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM * gwking on twitter









More information about the cl-containers-devel mailing list