Misleading doc string

Todd Fleming todd at flemingcnc.com
Fri Nov 25 17:18:30 PST 2005


dictionary.slate has the following:

d@(Dictionary traits) includes: obj
"Returns whether the object is equal to some keyed value."
[
  (d detect: [| :each | d equalsBlock applyWith: obj with: each]) isNotNil
].

"keyed" implies to me that this function is looking for the key, but it 
isn't.  Example:

Slate 36> addSlot: #x valued: Dictionary new.
Slate 37> x add: 1 -> 2.
Slate 38> x includes: 1.
False
Slate 39> x includes: 2.
True

Todd




More information about the Slate mailing list