From Newsgroup: comp.lang.scheme
Levi Campbell wrote:
(defun lookup-variable (search-name)
(loop for (name . value) in *variables* do
(when (eql name search-name)
(return-from lookup-variable value))))
Gauche Scheme:
(use srfi-42) ;; first-ec
(use util.match)
(define (lookup search-name)
(first-ec #f
(:list e Variables)
(begin (match-define (name . value) e))
(if (eqv? search-name name))
value))
--
[T]he problem is that lispniks are as cultish as any other devout group and basically fall down frothing at the mouth if they see [heterodoxy].
--- Kenny Tilton
The good news is, it's not Lisp that sucks, but Common Lisp. --- Paul Graham --- Synchronet 3.21a-Linux NewsLink 1.2