Skip to content

Instantly share code, notes, and snippets.

@ehaliewicz
Created October 25, 2012 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ehaliewicz/3950145 to your computer and use it in GitHub Desktop.
Save ehaliewicz/3950145 to your computer and use it in GitHub Desktop.
(defun contains (self value)
(labels ((recur (value current)
(if (null current)
nil
(cond
((= value current.value) t)
((< value current.value) (recur value current.left))
(t (recur value current.right))))))
(recur value self.root)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment