Commit b7c8ee3b authored by amirouche's avatar amirouche

grf3: remove get-vertex and get-or-create-vertex

get-vertex and get-or-vertex will iterate over the whole vertices this
not something that you want.
parent ffe1296e
......@@ -293,17 +293,3 @@ the traversi via traversi-deconstruct"
(define-public end
(lambda (uid)
(fs:ref uid '%end)))
;;; other helpers
(define-public (get-vertex key value)
(let ((uids (traversi->list (traversi-filter (where? '%kind VERTEX) (from key value)))))
(if (null? uids)
#false
(get (car uids)))))
(define-public (get-or-create-vertex key value)
(let ((uids (traversi->list (traversi-filter (where? '%kind VERTEX) (from key value)))))
(if (null? uids)
(values #true (create-vertex (acons key value '())))
(values #false (get (car uids))))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment