skiplist-search

Synopsis

(skiplist-search skiplist key)

Parameters

  • skiplist
  • key

Description

This procedure searches a skip list looking for an exact key. The following data types are valid keys:

  • string
  • macaddr
  • macaddr-range
  • ipaddr
  • ipaddr-range

Side Effects

Return Value

When there’s no entry with a matching key #f is returned, otherwise the associated data is returned as a string or exact number.

See Also

Example

> (define sl (skiplist-create))
sl
> (skiplist-insert! sl '11:22:33:44:55:66 "result data")
ok
> (skiplist-search sl '11:22:33:44:55:67)
#f
> (skiplist-search sl '11:22:33:44:55:66)
"result data"
> (skiplist-insert! sl '11:22:33:44:55:66 144)
ok
> (skiplist-search sl '11:22:33:44:55:66)
144
>