skiplist-next-string

Synopsis

(skiplist-next-string skiplist string)

Parameters

  • skiplist
  • string

Description

This procedure looks up the skip list with the specified string as the search key. The key of the next skip list node is returned as a string. This procedure may be useful for dictionary searches of various kinds.

Side Effects

Return Value

A string or #f.

See Also

Example

> (define s (skiplist-create))
s
> (skiplist-insert! s "Max" 0)
ok
> (skiplist-insert! s "Moritz" 0)
ok
> (skiplist-next-string s "M")
"Max"
> (skiplist-next-string s "Mo")
"Moritz"
> (skiplist-next-string s "Max2")
"Moritz"
> (skiplist-next-string s "Moritz2")
#f
>